Re: Can pg_dump make use of CURRENT/SESSION_USER

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Can pg_dump make use of CURRENT/SESSION_USER
Дата
Msg-id 20150429170406.GI4369@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Can pg_dump make use of CURRENT/SESSION_USER  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: Can pg_dump make use of CURRENT/SESSION_USER  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Fabrízio de Royes Mello wrote:

> I have this idea:
> 
> 1) Add an ObjectAddress field to CommentStmt struct an set it in gram.y
> 
> 2) In the CommentObject check if CommentStmt->address is
> InvalidObjectAddress then call get_object_address else use it

For DDL deparsing purposes, it seems important that the affected object
address can be reproduced somehow.  I think pg_get_object_address()
should be considered, as well as the object_address test.

If we do as you propose, we would have to deparse
COMMENT ON CURRENT DATABASE IS 'foo'
as COMMENT ON DATABASE whatever_the_name_is IS 'foo'

which is not a fatal objection but doesn't seem all that great.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Feedback on getting rid of VACUUM FULL
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Missing importing option of postgres_fdw