473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

pg_restore -l and schema name

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
1 2755
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joshua D. Drake | last post by:
Alright, we are testing pg_restore while restoring a 7GB database. This database has about 6GB of large objects and about 1Gb of textual data. The problem has been verified on PostgreSQL 7.3.2,...
14
by: Ron Johnson | last post by:
Hi, While on the topic of "need for in-place upgrades", I got to think- ing how the pg_restore could be speeded up. Am I wrong in saying that in the current pg_restore, all of the indexes are...
0
by: Aienthiwan | last post by:
Hello all, I'm running a debian server and recently updated my version of PostgreSQL to "unstable", that being v7.4.1. I had no trouble at all getting everything up to date and going. But my...
6
by: Mike Charnoky | last post by:
Hello, I am currently using PostgreSQL v7.3.4 on a RedHat 8.0 system (2.4.23 kernel) using the ext3 filesystem. I am experiencing problems when performing a pg_restore using a file which is...
0
by: Carlos | last post by:
Could someone clarify the use of the -L option in pg_restore? I have a pg_dump of a database (options -Ft -b) and I want to restore most of the dump with the exception of one table into another...
1
by: Neil Zanella | last post by:
Hello, I have an SQL database which I create with: psql -f create.sql foodb I then access this database and perform several insertions, modifications, and deletions. Finally, I want to...
7
by: Tim Penhey | last post by:
Maybe it's just me, but I can't seem to get pg_restore to restore a database... I am running 8.0 beta 2 (using the dev3 installer) on Windows XP. I created a very simple database with one...
1
by: ruben | last post by:
Hi: I'm trying to dump tableA and restore it to tableB: $ ./pg_dump -Fc -t tableA databaseA -f tableA.dump -v $ ./pg_restore -t tableB -d databaseA tableA.dump -v pg_dump creates...
0
by: aktivo | last post by:
pg_dump remove name of schema from default value. i don't know why. how can i solve this problem ? For example: BEFORE PG_DUMP: CREATE TABLE "is8"."tb_kotuce" ( "id_kotuc" CHAR(10) DEFAULT...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.