Re: Verbose output of pg_dump not show schema name
От | Heikki Linnakangas |
---|---|
Тема | Re: Verbose output of pg_dump not show schema name |
Дата | |
Msg-id | 53FB84F4.5000209@vmware.com обсуждение исходный текст |
Ответ на | Re: Verbose output of pg_dump not show schema name (Fabrízio de Royes Mello <fabriziomello@gmail.com>) |
Ответы |
Re: Verbose output of pg_dump not show schema name
|
Список | pgsql-hackers |
On 08/20/2014 11:11 PM, Fabrízio de Royes Mello wrote: > On Wed, Aug 20, 2014 at 2:43 AM, Michael Paquier <michael.paquier@gmail.com> > wrote: >> >> I had a look at this patch, and here are a couple of comments: >> 1) Depending on how ArchiveEntry is called to register an object to >> dump, namespace may be NULL, but it is not the case >> namespace->dobj.name, so you could get the namespace name at the top >> of the function that have their verbose output improved with something >> like that: >> const char *namespace = tbinfo->dobj.namespace ? >> tbinfo->dobj.namespace->dobj.name : NULL; >> And then simplify the message output as follows: >> if (namespace) >> write_msg("blah \"%s\".\"%s\" blah", namespace, classname); >> else >> write_msg("blah \"%s\" blah", classname); >> You can as well safely remove the checks on namespace->dobj.name. > > Ok AFAICS, the namespace can never be NULL in any of these. There is a "selectSourceSchema(fout, tbinfo->dobj.namespace->dobj.name)" call before or after printing the message, so if tbinfo->dobj.namespace is NULL, you'll crash anyway. Please double-check, and remove the dead code if you agree. - Heikki
В списке pgsql-hackers по дате отправления: