From: Andro <andromede@gmail.com>
To: pgsql-interfaces@postgresql.org
Subject: play with current schema
Date: Mon, 16 Oct 2006 17:58:21 +0200
Message-ID: <da7021e0610160858o1605eed8tf546cfea72994d85@mail.gmail.com> (raw)
Hi,
this may not be the right place to address this question but I've already
subscribed on this list.
I'm connected as user "def" and here's what happens while modifying
current_schema - i.e. search_path var :
##########
db=> \dn
List of schemas
Name | Owner
--------------------+---------
abc | abc
[...]
db=> select current_schema();
current_schema
----------------
public
(1 row)
db=> show search_path ;
search_path
--------------
$user,public
(1 row)
db=> SET search_path TO abc;
SET
db=> select current_schema();
current_schema
----------------
(1 row)
db=> show search_path ;
search_path
-------------
abc
(1 row)
###########
Trying to change the current schema to a _not owned_ schema will _not_ raise
any error and result in this 'misbehaviour' between the two commands showing
the current schema.
select current_schema() will return NULL ...
Did I miss something or everything's normal here?
Isn't it supposed to raise an error or succeed and then the two commands
would display the same?
However, what's the difference between those two commands except that the
latter is a variable and the former will pick up stuff from catalog's table?
Thanks for help
Charles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: andromede@gmail.com
Subject: Re: play with current schema
In-Reply-To: <da7021e0610160858o1605eed8tf546cfea72994d85@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox