Re: How to watch for schema changes

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to watch for schema changes
Дата
Msg-id CAKFQuwbNzGjpjizwb+2Z_j4n2tKwb4XB7aR_Na2iREJkMmRg+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to watch for schema changes  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Mon, Dec 3, 2018 at 10:59 AM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> > As I say - I'm trying to make it work from both ODBC and libpq
> > connection (one at a time)

IIUC what is being proposed is:

Once, on the server, the DBA issues:
CREATE EVENT TRIGGER (the function it runs issues NOTIFY
'channel-name' - even if no one is listening at any given point in
time)

Upon connection your client application executes:
LISTEN 'channel-name'
And then handles notification events from the channel normally.

The client itself never issues CREATE EVENT - nor, frankly, should it.
It shouldn't have sufficient permissions to do something like that.

David J.


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to watch for schema changes
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Query never completes with an OR condition