object description for FDW user mappings

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
object description for FDW user mappings
Дата
Msg-id
20150305154617.GT3291@alvh.no-ip.org
Список
Дерево обсуждения
object description for FDW user mappings Alvaro Herrera <alvherre@2ndquadrant.com>
Re: object description for FDW user mappings Tom Lane <tgl@sss.pgh.pa.us>
Re: object description for FDW user mappings Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: object description for FDW user mappings Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: object description for FDW user mappings Tom Lane <tgl@sss.pgh.pa.us>
Re: object description for FDW user mappings Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: object description for FDW user mappings Tom Lane <tgl@sss.pgh.pa.us>
Re: object description for FDW user mappings David G Johnston <david.g.johnston@gmail.com>
When commit cae565e503 introduced FDW user mappings, it used this in
getObjectDescription for them:

	appendStringInfo(&buffer, _("user mapping for %s"), usename);

This was later mostly copied (by yours truly) as object identity by
commit f8348ea32e wherein I used this:
	appendStringInfo(&buffer, "%s", usename);

As it turns out, this is wrong, because the pg_user_mapping catalog has
a two-column "primary key" which is user OID and server OID.  Therefore
it seems to me that the correct object description and identity must
include both username and server name.  I propose we change the above to
this:

	appendStringInfo(&buffer, _("user mapping for %s in server %s"), usename,
				 srv->servername);

I propose to apply the (appropriately rebased) attached patch to all
back branches.  Note in particular the wording changes in some error
messages in the foreign_data test.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Robert Haas
Дата:
Сообщение: Re: Combining Aggregates
FAQ