By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

pg_restore -l and schema name

P: n/a
Dear Postgresql people,

For the first time I'm trying to use pg_restore to do a partial restore.
It looks as if it should be easy: pg_restore -l, filter out the
required tables, then pg_restore -L. But unfortunately the listing
generated by pg_resotre doesn't include the schema name! Since my
database consists of lots of almost-identical schemas, I'm a bit stuck.

So this message is really a feature request for "please include the
schema name in the pg_restore -l output". Also, I'd be interested to
hear from anyone who has faced this problem before and can suggest how
to work around it.

Thanks in advance for any help.

Regards,

--Phil.
p.s. I'm logging long-running statements to syslog, and I'd also love to
see schema names there. But that's a less important problem.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Phil Endecott <sp**************************@chezphil.org> writes:
So this message is really a feature request for "please include the
schema name in the pg_restore -l output".


Seems reasonable. I've applied the attached patch to 8.0; you can
probably apply it locally without much trouble (the change is in
PrintTOCSummary() if you can't find the spot easily).

regards, tom lane
*** src/bin/pg_dump/pg_backup_archiver.c.orig Fri Sep 10 16:05:18 2004
--- src/bin/pg_dump/pg_backup_archiver.c Fri Oct 8 10:57:37 2004
***************
*** 699,707 ****
while (te != AH->toc)
{
if (_tocEntryRequired(te, ropt, false) != 0)
! ahprintf(AH, "%d; %u %u %s %s %s\n", te->dumpId,
te->catalogId.tableoid, te->catalogId.oid,
! te->desc, te->tag, te->owner);
te = te->next;
}

--- 699,708 ----
while (te != AH->toc)
{
if (_tocEntryRequired(te, ropt, false) != 0)
! ahprintf(AH, "%d; %u %u %s %s %s %s\n", te->dumpId,
te->catalogId.tableoid, te->catalogId.oid,
! te->desc, te->namespace ? te->namespace : "-",
! te->tag, te->owner);
te = te->next;
}
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.