From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump and schema names |
Date: | 2013-08-09 17:13:58 |
Message-ID: | 20130809171358.GC3353@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 9, 2013 at 12:53:20PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Fri, Aug 9, 2013 at 01:48:43AM -0400, Tom Lane wrote:
> >> The practical difficulties involved can be seen by reading the comments
> >> and code for _getObjectDescription().
>
> > Yes, I looked at that. Seems _getObjectDescription() is only called
> > from _printTocEntry(), and that function has a call to
> > _selectOutputSchema() at the top, so we already know we have search_path
> > set to the proper schema.
>
> > The attached patch removes the unnecessary schema qualification for
> > ALTER OWNER, and the attached dump file show a two-schema dump that
> > restores just fine.
>
> This really requires more than no attention to the comments, especially
> since you just removed the only apparent reason for _getObjectDescription
> to make a distinction between objects whose name includes a schema and
> those that don't.
I am confused. Are you saying I didn't read the comments, or that I can
now merge the schema-qualified and non-schema-qualified object sections?
Also, this seems like dead code as there is no test for "INDEX" in the
if() block it exists in:
/*
* Pre-7.3 pg_dump would sometimes (not always) put a fmtId'd name
* into te->tag for an index. This check is heuristic, so make its
* scope as narrow as possible.
*/
if (AH->version < K_VERS_1_7 &&
te->tag[0] == '"' &&
te->tag[strlen(te->tag) - 1] == '"' &&
strcmp(type, "INDEX") == 0)
appendPQExpBuffer(buf, "%s", te->tag);
else
Please advise.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-08-09 17:17:15 | Re: confusing error message |
Previous Message | Craig Ringer | 2013-08-09 16:57:14 | Re: confusing error message |