Need SQL of create TABLE including INDEX and SEQUENCE

From: Francisco Leovey <fleovey(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Need SQL of create TABLE including INDEX and SEQUENCE
Date: 2011-04-11 11:55:00
Message-ID: 342766.41897.qm@web39302.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello
 
For a new project where I am running 2 versions of Postgres (8.4 and 9.0) simultaneously on an Ubuntu server:
I need the syntax of an SQL statement in order to create tables and all index from one database to the other via a utility program I have in Perl.
I see PgAdmin shows on the lower pane all the SQL needed to create a table and all its index, but I do not know how to obtain that info.
It would be optimal if I can get all the info in a single query (the way pgdump does).
Also I need the SQL to create all the SEQUENCES.
 
Thank you
 
 

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Glaesemann 2011-04-11 16:06:34 Re: Need SQL of create TABLE including INDEX and SEQUENCE
Previous Message Saseendra Babu 2011-04-11 08:04:37 'Range partitioning in PGSQL'