Subject: About SET SEARCH_PATH

From: Christoph Haller <[email-masked]>
Date: Wed, 17 Sep 2003 17:05:16 +0200

I'm thinking of introducing schemas within my databases.
Reading the doc I've found some stuff which does not
seem right. I'm referring to 7.3.4.

(1)
$PGSQLD/doc/html/functions-misc.html

The search path may be altered by a run-time setting.
The command to use is SET SEARCH_PATH 'schema'[,'schema']...

It should be
SET SEARCH_PATH TO schema[,schema]...

May be a link to
$PGSQLD/doc/html/ddl-schemas.html
should be used instead, it has it all right.

(2)
$PGSQLD/doc/html/sql-set.html

This page does not mention the SEARCH_PATH variable at all.
Is this intended?

Regards, Christoph

---

From: Tom Lane <[email-masked]>
Date: Wed, 17 Sep 2003 16:40:32 -0400

> SET SEARCH_PATH TO schema[,schema]...

Actually, you can do it either way:

regression=# set search_path TO a,b,c;
regression=# set search_path TO 'a','b','c';

although not

regression=# set search_path TO 'a,b,c';
ERROR:  schema "a,b,c" does not exist

This is mainly for legacy reasons (the grammar involved was originally
used for DateStyle...).  I don't object to documenting primarily the
first form, though.

> This page does not mention the SEARCH_PATH variable at all.

Yeah; that page only documents SET items that are not in the main list
of run-time-configurable parameters.

			regards, tom lane

---

From: Harry Broomhall <[email-masked]>
Date: Fri, 19 Sep 2003 15:13:10 +0100

On Wed, 17 Sep 2003 16:40:32 -0400, [email-masked] (Tom Lane)

>ERROR:  schema "a,b,c" does not exist

   But surely not without the 'TO' word, which is how it appears in
6.13 of the User's Guide?

   Regards,
          Harry.

---

From: Tom Lane <[email-masked]>
Date: Fri, 19 Sep 2003 12:09:40 -0400

> 6.13 of the User's Guide?

Right.  I see this is already fixed in the 7.4 docs.

			regards, tom lane