Search Postgresql Archives

Re: Getting my Database name in a C Extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux