Re: [SQL] Dumping table definitions

2005-07-18 Thread Dawid Kuroczko
On 7/18/05, Mark Fenbers <[EMAIL PROTECTED]> wrote: > I am looking for a way to reformat the information that is generated from > \d mytable > into SQL syntax, such that the table can be recreated with 'psql -f > mytable.sql' complete with index and constraint definitions. I can do > awk and s

Re: [SQL] Dumping table definitions

2005-07-18 Thread Tom Lane
"Mark Fenbers" <[EMAIL PROTECTED]> writes: > I am looking for a way to reformat the information that is generated from > \d mytable > into SQL syntax, such that the table can be recreated with 'psql -f > mytable.sql' complete with index and constraint definitions. I can do > awk and sed comm

Re: [SQL] Dumping table definitions

2005-07-18 Thread Jim Buttafuoco
use pg_dump with the --schema-only and --table= params -- Original Message --- From: "Mark Fenbers" <[EMAIL PROTECTED]> To: Pg SQL Discussion Group Sent: Mon, 18 Jul 2005 12:50:54 -0400 Subject: [SQL] Dumping table definitions > I am looking for a

[SQL] Dumping table definitions

2005-07-18 Thread Mark Fenbers
I am looking for a way to reformat the information that is generated from \d mytable into SQL syntax, such that the table can be recreated with 'psql -f mytable.sql' complete with index and constraint definitions. I can do awk and sed commands to do this if I need to, but first wanted to che