dumping a pg_* table

Started by Johnson, Shaunnover 23 years ago3 messagesgeneral
Jump to latest
#1Johnson, Shaunn
SJohnson6@bcbsm.com

Howdy:

I must be missing something simple: is it written
somewhere that I can not dump a table that starts
with pg_*? I can do a:

'pg_dump -t tmp_table -d database -f /tmp/tmp_table.dmp'

and get something, but I can't seem to get a dump
of the pg_* tables ... even when I use a '-U postgres'.

What am I doing wrong?

Thanks!

-X

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Johnson, Shaunn (#1)
Re: dumping a pg_* table

"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:

I must be missing something simple: is it written
somewhere that I can not dump a table that starts
with pg_*?

Yeah, right in the pg_dump sources, about line 2100 of pg_dump.c
in release 7.2 ;-)

Why would you want to do a pg_dump of a system catalog, anyway?
You couldn't restore it. Perhaps what you really want is pg_dump's
-s (schema only) option.

regards, tom lane

#3Johnson, Shaunn
SJohnson6@bcbsm.com
In reply to: Tom Lane (#2)
Re: dumping a pg_* table

--thanks for the reply:

--i'm not really looking to restore it.
--i've been having problems with pgAdmim II;
--i got a request for a dump of that
--table to see where the tool is failing.

--if it's just the data that is needed, i can
--copy to a file, but i'm guessing it's a bit
--more involved than that.

-X

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]

"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
I must be missing something simple: is it written
somewhere that I can not dump a table that starts
with pg_*?

Yeah, right in the pg_dump sources, about line 2100 of pg_dump.c
in release 7.2 ;-)

Why would you want to do a pg_dump of a system catalog, anyway?
You couldn't restore it. Perhaps what you really want is pg_dump's
-s (schema only) option.

regards, tom lane