From: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Erik Rijkers <er(at)xs4all(dot)nl> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_restore: show object schema name in verbose output |
Date: | 2013-08-04 13:35:07 |
Message-ID: | CAB8KJ=jf4vCZyGqRwf_=dswh6S_J6r-Rw-+QUcq85Ay=oWDB2Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/8/4 Ian Lawrence Barwick <barwick(at)gmail(dot)com>:
> 2013/8/4 Erik Rijkers <er(at)xs4all(dot)nl>:
>> On Sun, August 4, 2013 04:51, Ian Lawrence Barwick wrote:
>>> I just noticed that pg_restore executing in "verbose" mode displays the
>>> name of the object being restored, but not its schema.
>>>
>>
>> Good idea. We have many schemata with tables of the same name and
>> reporting the schema name certainly improves the readability and error
>> trackdown during restore.
>>
>> I notice 2 things:
>>
>>
>> 1. pg_restore now outputs reports about COMMENT like this:
>> pg_restore: creating COMMENT restore_verbose_test.TABLE t
>> pg_restore: creating COMMENT restore_verbose_test.COLUMN t.c
>> pg_restore: creating COMMENT restore_verbose_test.COLUMN t.i
>>
>> I assume the .TABLE and .COLUMN here is a bug; it should just be:
>>
>> pg_restore: creating COMMENT restore_verbose_test t
>>
>> as it used to be.
Actually the current output would be:
pg_restore: creating COMMENT TABLE t
Anyway this is a bit trickier than I originally thought, but I understand
the inner workings of pg_restore et al better now anyway :)
>> 2. Several of the lines that are output by pg_restore now mention
>> the schema, but not the "processing" line:
>>
>> pg_restore: processing data for table "t"
>>
>> Could it be added there too?
That looks quite straightforward.
> Thanks for the feedback and test case. I'll submit a revised patch.
The attached patch should work somewhat better, but methinks I'll need
to work on it a bit more. Also, for the sake of consistency it would
be useful to show the schema (where appropriate) in the owner/privileges
setting output, e.g.:
pg_restore: setting owner and privileges for TABLE t
Regards
Ian Barwick
Attachment | Content-Type | Size |
---|---|---|
pg-restore-verbose-output-schema-2013-08-04.patch | application/octet-stream | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2013-08-04 20:26:52 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Previous Message | Dimitri Fontaine | 2013-08-04 13:20:54 | Re: Extension Templates S03E11 |