Skip site navigation (1) Skip section navigation (2)

Re: function to display ddl

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: function to display ddl
Date: 2010-02-14 17:17:42
Message-ID: 20100214171741.GC10939@rice.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
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.                                 reedstrm(at)rice(dot)edu
Systems Engineer & Admin, Research Scientist        phone: 713-348-6166
The Connexions Project      http://cnx.org            fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E  F888 D3AE 810E 88F0 BEDE

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-14 17:24:59
Subject: Re: knngist patch support
Previous:From: Tom LaneDate: 2010-02-14 17:11:39
Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group