Re: how to get the connected session pointer ( Archive * AH)

Поиск
Список
Период
Сортировка
От AI Rumman
Тема Re: how to get the connected session pointer ( Archive * AH)
Дата
Msg-id CAGoODpfEsqBPHGxNnWgyX4o5_q7Wv7CiRbfSrQ76oKe+3Zu1Dw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to get the connected session pointer ( Archive * AH)  (Luca Ferrari <fluca1978@infinito.it>)
Ответы Re: how to get the connected session pointer ( Archive * AH)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: how to get the connected session pointer ( Archive * AH)  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
I have a libpq C interface code which takes user/password to connect to the db. Now, I want to call it from a pgsql function where user will not need to put any user name or password, rather it will use the current session ID.
How can I do it? Any idea, please.

Thanks.


On Tue, Oct 22, 2013 at 2:05 AM, Luca Ferrari <fluca1978@infinito.it> wrote:
On Tue, Oct 22, 2013 at 1:32 AM, AI Rumman <rummandba@gmail.com> wrote:
> Hi,
>
> Is there a way in Postgresql C function to get the connected session pointer
> ( Archive * AH)
> and use it for further execution?

If I read pg_archiver.c correctly, the AH pointer is used only during
the archiving and is not "globally" stored anywhere, and therefore I
suspect the answer is NO (at least unless you modify the archiver).
What is the aim of having such pointer?

Luca

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: pg_dumpall from a script
Следующее
От: Tom Lane
Дата:
Сообщение: Re: how to get the connected session pointer ( Archive * AH)