From: | Cedric Berger <cedric(at)precidata(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Getting my Database name in a C Extension |
Date: | 2014-10-03 07:31:54 |
Message-ID: | 542E50EA.9030203@precidata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 02/10/14 18:13, Tom Lane wrote:
> Cedric Berger <cedric(at)precidata(dot)com> writes:
>
>> 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?
http://www.postgresql.org/docs/9.3/static/fdw-callbacks.html
Sorry for these beginner's questions, but I've trouble navigating
the documentation / source / examples for this kind of info.
PS: is "which see for additional details" really good English
in the fdw-callbacks.html documentation?
>> 2) Is there a way to get this information in the SQL extension
>> installation/update scripts (like the @/extschema/@ substitution)?
>
> Nope. Doesn't seem to me like a remarkably good idea to refer to it
> in that sort of way anyway. What would happen if someone renamed
> the database after the extension is installed?
Ok,
Make sense,
Thanks
Cedric
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios | 2014-10-03 07:49:45 | Re: PostgreSQL Inheritance and column mapping |
Previous Message | Andrus | 2014-10-03 06:28:57 | Re: How to find greatest record before known values fast |