From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com> |
Cc: | "PostgreSQL General (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: table dump function |
Date: | 2013-03-07 16:05:13 |
Message-ID: | 5138BAB9.2010401@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 03/07/2013 07:58 AM, Little, Douglas wrote:
> I need a pl/pgsql function that will dump a table ddl so I can export
> the definition to a file before I drop the object.
>
> the psql \d command won’t work, since it doesn’t dump the table ddl, it
> just lists the table’s attributes and indexes.
>
> I’ve got the function mostly working, but need help translating the ACL
> list into the grant commands.
>
> Are there any standard PG functions that would be useful for creating
> the grants?
pg_dump -U some_user -t some_table -s -f some_table.sql some_database
http://www.postgresql.org/docs/9.2/interactive/app-pgdump.html
>
> Thanks in advance.
>
> *Doug Little*
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Little, Douglas | 2013-03-07 16:33:30 | Re: FW: statement failure |
Previous Message | Little, Douglas | 2013-03-07 15:58:25 | table dump function |