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