View Single Post

   
  #4 (permalink)  
Old 04-19-2008, 07:01 PM
Frank Bax
 
Posts: n/a
Default Re: how do I get table DDL from psql (not from pg_dump)

Sofer, Yuval wrote:
> I need to extract table DDL (create script) from database connection
> (using sql, by retrieving system table info or by activating some pg
> function)



This command should output the SQL you need...

echo '\d tablename' | psql -E



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote