sharing variables between client and server again

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема sharing variables between client and server again
Дата
Msg-id CAFj8pRAg3WOEzzVui1_1mJuaBOF+saQ9wajK4gMNhKZBO2=i0w@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hello

this is VIP patch that implements shared - "status" variables to
PostgreSQL. A motivation for this features is possibility to take
client parameters inside inlined PL blocks.

This design is based on Magnus's ideas. Content is synchronized
between server and client. This doesn't need a protocol enhancing.

pavel ~ $ psql postgres -v status.myparam=Hello
psql (9.3devel)
Type "help" for help.

postgres=# \echo :status.myparam
Hello
postgres=# show status.myparam;
 status.myparam
----------------
 Hello
(1 row)

postgres=# do $$ begin raise notice '%',
current_setting('status.myparam'); end $$ language plpgsql;
NOTICE:  Hello
DO

postgres=# set status.myparam = 'Bobo';
SET
postgres=# \echo :status.myparam
Bobo

postgres=# \set status.myparam Otis
postgres=# show status.myparam;
 status.myparam
----------------
 Otis
(1 row)

Regards

Pavel Stehule

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Bug in libpq implentation and omission in documentation?
Следующее
От: Robert Haas
Дата:
Сообщение: SIGFPE handler is naive