Re: [GENERAL] What is exactly a schema?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] What is exactly a schema?
Дата
Msg-id CAKFQuwa4EZAPCO08qJizNrGG6Z_CPK=3g+a8ivn+D9eM9hdyNQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] What is exactly a schema?  (marcelo <marcelo.nicolet@gmail.com>)
Список pgsql-general
On Fri, Jul 14, 2017 at 9:13 AM, marcelo <marcelo.nicolet@gmail.com> wrote:
I'll be using Devart's dotConnect. I have two alternatives at this moment

a) To set the user name to the required schema. This has the (little) drawback that forces user configuration for every schema...

​With "ALTER ROLE SET" the user name and initial search_path are both explicitly specified and do not need to match...​

b) To manually do something like the JDBC driver you mention, but it triggers some questions
b.1) To execute the set search_path one must be connected, database name included. I think by that time, the default schema is determined. Or I am wrong, am I?

​You are mistaken.  When doing it at the connection-level an actual "SET search_path" SQL command is not generated - instead the server simply uses the data present in the connection string to change runtime variables before the connection is made ready for use.
 
b.2) The search_path is valid for the database or restricted to the connection?

​You need to rephrase this question.  From a client's perspective everything is restricted to the connection - and a given connection only exists to a single database at any given time.

And if you can avoid top-posting it would be much appreciated.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] What is exactly a schema?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] What is exactly a schema?