Re: What is exactly a schema?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: marcelo <marcelo(dot)nicolet(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is exactly a schema?
Date: 2017-07-14 16:23:38
Message-ID: CAKFQuwa4EZAPCO08qJizNrGG6Z_CPK=3g+a8ivn+D9eM9hdyNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 14, 2017 at 9:13 AM, marcelo <marcelo(dot)nicolet(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2017-07-14 16:50:12 Re: What is exactly a schema?
Previous Message David G. Johnston 2017-07-14 16:14:04 Re: What is exactly a schema?