Take the 2-minute tour ×  Is there a MySQL equivalent of SHOW
CREATE TABLE in postgres? Is this possible? If not what is the
next best solution?  I need the statement because I use it to
create the table on an remote server (over WCF).  share|improve
this question add comment  2 Answers  up vote 11 down vote
accepted  You can try to trace in the PostgreSQL log file what
"pg_dump -t table -s" really does.Then you can use the same
method to write your own sql function.  share|improve this
answer ok, i traced the pg_dump. But it wasn't as easy, becouse
i had to write my own function in C# to write the create table
statement. But it was a big help, so thank you veeeeerrrryyyy
much. :D –  vlebar Feb 9 '11 at 7:41 add comment   pg_dump -st
tablename dbname  or use PostgreSQL GUI
Tools(pgAdmin,phpPgAdmin,etc.)  share|improve this answer i'll
try to explain the problem in more detail. I need the sql
statement (select or stored procedure) becouse I execute the sql
command in C# (NpgsqlCommand). So I think the pg_dump