Re: Database Oid from SPI

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Re: Database Oid from SPI
Дата
Msg-id eaaapr$1bcf$2@news.hub.org
обсуждение исходный текст
Ответ на Database Oid from SPI  (Markus Schiltknecht <markus@bluegap.ch>)
Ответы Re: Database Oid from SPI
Re: Database Oid from SPI
Список pgsql-general
Whoops, sorry, there was another reason for the segfault. Using
MyProc->databaseId works. Is it the right way to do it, though?

Markus Schiltknecht wrote:
> Hi,
>
> how can I get the database name or OID of the current backend in a SPI
> function (in plain C)? I tried including storage/proc.h and accessing
> MyProc->databaseId, but that leads to a segfault :-(  (and seems like
> the wrong way to do it.)
>
> The SPI documentation didn't help.
>
> Thank you
>
> Markus

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

Предыдущее
От: Markus Schiltknecht
Дата:
Сообщение: Database Oid from SPI
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Database Oid from SPI