Re: Getting my Database name in a C Extension
От | Cedric Berger |
---|---|
Тема | Re: Getting my Database name in a C Extension |
Дата | |
Msg-id | 542E50EA.9030203@precidata.com обсуждение исходный текст |
Ответ на | Re: Getting my Database name in a C Extension (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Getting my Database name in a C Extension
|
Список | pgsql-general |
On 02/10/14 18:13, Tom Lane wrote: > Cedric Berger <cedric@precidata.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
В списке pgsql-general по дате отправления: