470,614 Members | 1,387 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

How to show database table/view/... declaration?

Hi,

I've been working a lot with MySQL for quite a while and now I'm trying to
get into PostgreSQL.

One problem that I still have and could not find an answer is how to get the
declaration of a table, view and so on. In MySQL I do it with 'show create
table', 'show create view' and so on, or by 'explain [tablename]'. Is there
an equivalent in PostgreSQL? Maybe in information_schema? How do I access
information_schema in PostgreSQL?

Thanks for any help ;-).

Markus
Sep 5 '05 #1
1 9137
PK
Markus Popp napisa≥(a):
One problem that I still have and could not find an answer is how to get the
declaration of a table, view and so on. In MySQL I do it with 'show create
table', 'show create view' and so on, or by 'explain [tablename]'. Is there
an equivalent in PostgreSQL? Maybe in information_schema? How do I access
information_schema in PostgreSQL?

I don't know if there is an equivalent to such commands, but you can use
pg_dump program to get the schema.
PK
Sep 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Brian Andrus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.