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 check if Pg already had tools to export the table structure (without the data). Does it?

Also, Is there a way to export the structure of all tables at once instead of one table at a time?

Mark
begin:vcard
fn:Mark Fenbers
n:Fenbers;Mark
org:DoC/NOAA/NWS/OHRFC
adr:;;1901 South SR 134;Wilmington;OH;45177-9708;USA
email;internet:[EMAIL PROTECTED]
title:Sr. HAS Meteorologist
tel;work:937-383-0430 x246
x-mozilla-html:TRUE
url:http://weather.gov/ohrfc
version:2.1
end:vcard

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

               http://archives.postgresql.org

Reply via email to