| От | Tom Lane |
|---|---|
| Тема | Re: Getting my Database name in a C Extension |
| Дата | |
| Msg-id | 29376.1412266413@sss.pgh.pa.us обсуждение |
| Ответ на | Getting my Database name in a C Extension (Cedric Berger <cedric@precidata.com>) |
| Ответы |
Re: Getting my Database name in a C Extension
|
| Список | pgsql-general |
Cedric Berger <cedric@precidata.com> writes:
> I'm writing an extention (FDW), and I need, in my C code, the name of
> my database ("contrib_regression_test" for example), and I've two
> questions:
> 1) What is the easiest way to get that directly in C?
The usual locution is "get_database_name(MyDatabaseId)".
> 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?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера