From: Preston Landers <planders@journyx.com>
To: Yusnel Rojas Garc?a <onemoverx@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: pg_dump using SQL
Date: Wed, 19 Mar 2008 15:24:12 -0500
Message-ID: <20080319202412.GJ25994@journyx.com> (raw)
In-Reply-To: <9f45496e0803181245v78508709g325d28012ff381a6@mail.gmail.com>
References: <9f45496e0803181245v78508709g325d28012ff381a6@mail.gmail.com>
Yusnel Rojas Garc?a(onemoverx@gmail.com)@2008.03.18 11:45:03 -0800:
> Hi everyone
>
> Is there any way to do what pg_dump does?, I mean, get the structure of a
> table in a database (ex: CREATE TABLE ...)
>
If you want to programmaticly discover the elements in a database
schema then you can always query the INFORMATION_SCHEMA:
http://www.postgresql.org/docs/current/static/information-schema.html
That isn't the same as having the raw DLL statements that created
them, but depending on your purpose may be good enough.
regards,
Preston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: planders@journyx.com, onemoverx@gmail.com
Subject: Re: pg_dump using SQL
In-Reply-To: <20080319202412.GJ25994@journyx.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox