set search_path failure

Started by Tatsuo Ishiiover 23 years ago4 messages
#1Tatsuo Ishii
t-ishii@sra.co.jp

I'm seeing this:

test=# create schema s1;
CREATE SCHEMA
test=# set search_path to 'public, s1';
ERROR: Namespace "public, s1" does not exist

Am I missing something?
--
Tatsuo Ishii

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tatsuo Ishii (#1)
Re: set search_path failure

Try 'public','s1' perhaps...

Chris

Show quoted text

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Tatsuo Ishii
Sent: Monday, 19 August 2002 2:31 PM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] set search_path failure

I'm seeing this:

test=# create schema s1;
CREATE SCHEMA
test=# set search_path to 'public, s1';
ERROR: Namespace "public, s1" does not exist

Am I missing something?
--
Tatsuo Ishii

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

#3Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Christopher Kings-Lynne (#2)
Re: set search_path failure

Try 'public','s1' perhaps...

Wao, this is confusing:-)

The man page says:

SET variable { TO | = } { value | 'value' | DEFAULT }

And:

test=# show search_path;
search_path
-------------
public, s1
(1 row)

So user naturally thinks

set search_path to 'public,s1';

is a correct syntax, no?
--
Tatsuo Ishii

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#3)
Re: set search_path failure

Tatsuo Ishii <t-ishii@sra.co.jp> writes:

The man page says:
SET variable { TO | = } { value | 'value' | DEFAULT }

So user naturally thinks
set search_path to 'public,s1';
is a correct syntax, no?

The man page needs improvement --- some variables accept a list of
values now. In particular
SET search_path = public, s1;
SET search_path = "public", "s1";
SET search_path = 'public', 's1';
would all be correct ways of expressing this. The other is not, and
can't be because it would require excluding commas from the set of
characters allowed in quoted schema names.

regards, tom lane