Re: [HACKERS] function to display ddl

2010-02-14 Thread Ross J. Reedstrom
On Sun, Feb 14, 2010 at 05:08:05PM +0100, Yeb Havinga wrote:
> Little, Douglas wrote:
> >
> >Hi,
> >
> > 
> >
> >Is there a PG command or fuction that will return table ddl?
> >
> If you just want the definition,in psql type \d tablename.
> To dump ddl the pg_dump with proper arguments can dump just the ddl of a 
> single table. (see pg_dump --help)

more of a pg-users question, but since we've got a partial answer here,
might as well complete it. Try psql -E, then \d sometable to see the
commands psql issues to generate its display.

Ross
-- 
Ross Reedstrom, Ph.D. reeds...@rice.edu
Systems Engineer & Admin, Research Scientistphone: 713-348-6166
The Connexions Project  http://cnx.orgfax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E  F888 D3AE 810E 88F0 BEDE

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] function to display ddl

2010-02-14 Thread Yeb Havinga

Little, Douglas wrote:


Hi,

 


Is there a PG command or fuction that will return table ddl?


If you just want the definition,in psql type \d tablename.
To dump ddl the pg_dump with proper arguments can dump just the ddl of a 
single table. (see pg_dump --help)


I'm not aware of a command or function that returns it though.

Regards,
Yeb Havinga


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] function to display ddl

2010-02-14 Thread Little, Douglas
Hi,

Is there a PG command or fuction that will return table ddl?

Thanks


Doug Little
Sr. Data Warehouse Architect | Enterprise Data Management | Orbitz Worldwide
500 W. Madison, Suite 1000  Chicago IL 60661| Office 312.260.2588 | Fax 
312.894.5164 | Cell 847-997-5741
douglas.lit...@orbitz.com

 [cid:image001.jpg@01CAAD58.A438BEB0]   orbitz.com | 
ebookers.com | 
hotelclub.com | 
cheaptickets.com | 
ratestogo.com | 
asiahotels.com

<>