Re: [HACKERS] Add support to COMMENT ON CURRENT DATABASE

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Add support to COMMENT ON CURRENT DATABASE
Дата
Msg-id CA+TgmobWQ=rc9PNGsnERsDEJ-jo5oCsavyKFWnPVZFdb4NrqOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Add support to COMMENT ON CURRENT DATABASE  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Jan 9, 2017 at 3:14 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> To achieve consistent support for specifying the current database, we
> would need to change the grammar for every command involving databases.

I wouldn't have thought there would be all that many of those, though.

> And it would also set a precedent for similar commands, such as current
> user/role.

True.  Maybe it's a GOOD precedent, though.

> Plus support in psql, pg_dump, etc. would get more complicated.

I'm not totally convinced...

> Instead, it would be simpler to define a grammar symbol like
>
> database_name: ColId | CURRENT_DATABASE
>
> and make a small analogous change in objectaddress.c and you're done.
>
> Compare rolespec in gram.y.

...but that's certainly an existing precedent for your proposal.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Replication/backup defaults
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Cache Hash Index meta page.