set search_path failure

Поиск
Список
Период
Сортировка
Искать

set search_path failure

От:
Tatsuo 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

Re: set search_path failure

От:
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Дата:
Try 'public','s1' perhaps...

Chris

> -----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
> 


Re: set search_path failure

От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
> 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

Re: set search_path failure

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Tatsuo Ishii  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 particularSET 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

FAQ