Search Postgresql Archives

Re: Getting my Database name in a C Extension

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

 



On 02/10/14 18:13, Tom Lane wrote:

Cedric Berger <cedric@xxxxxxxxxxxxx> 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



--
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