Re: DB & Schema
От | Heikki Linnakangas |
---|---|
Тема | Re: DB & Schema |
Дата | |
Msg-id | 505C929D.5070400@vmware.com обсуждение исходный текст |
Ответ на | DB & Schema ("md@rpzdesign.com" <md@rpzdesign.com>) |
Ответы |
External Replication
|
Список | pgsql-hackers |
On 21.09.2012 17:58, md@rpzdesign.com wrote: > During the execution of ProcessUtility() function in > /src/backend/xxx/utility.c, > > the CreateStmt node type is processed to create a table. > > Is there a global function in the context of the backend process that > will deliver what the current database and schema names? There's a global variable MyDatabaseId for the database the backend is connected to. It doesn't change after login. There's no such thing as a "current schema", but I think you'll want to take a look at src/backend/catalog/namespace.c, which handles the search_path. There's a variable activeCreationNamespace there; look at the functions in namespace.c to see how it works. - Heikki
В списке pgsql-hackers по дате отправления: