Re: Getting my Database name in a C Extension

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Getting my Database name in a C Extension
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17D55514@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Getting my Database name in a C Extension  (Cedric Berger <cedric@precidata.com>)
Ответы Re: Getting my Database name in a C Extension  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Cedric Berger wrote:
>>> 1) What is the easiest way to get that directly in C?
>>
>> The usual locution is "get_database_name(MyDatabaseId)".
> 
> Ok, but then how do I find "MyDatabaseId" in, say,
> a BeginForeignScan() or GetForeignRelSize() FDW callback?

It is a global, all you should have to do is
#include "miscadmin.h"

Yours,
Laurenz Albe

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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: PostgreSQL Inheritance and column mapping
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Getting my Database name in a C Extension