BUG #1858: setting search path in select doesn't (always) work

From: "D(dot)J(dot) Kniep" <dick(dot)kniep(at)lindix(dot)nl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1858: setting search path in select doesn't (always) work
Date: 2005-09-01 15:15:53
Message-ID: 20050901151553.6085AF12A9@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1858
Logged by: D.J. Kniep
Email address: dick(dot)kniep(at)lindix(dot)nl
PostgreSQL version: 7.4.8
Operating system: Linux (SuSE 9.3) /RedHat ES 4
Description: setting search path in select doesn't (always) work
Details:

we have been running a Zope site with Postgresql 7.4.8 for a while. In this
installation almost the first statement is:

cvix=# SELECT set_config('search_path', '"' || t2.schema || '"', true)
cvix-# FROM "Lindix"."Gebruikers" as t1, "Lindix"."Administratie" as t2
cvix-# WHERE uid = 'zon0023'
cvix-# AND t1.administratie_id = t2.administratie_id;
set_config
------------------
"adeuxproductie"
(1 row)

As you can see, I have a fixed schema called "Lindix" where the actual
destination schema is in a table. Depending on the user, the search_path is
set and it will be able to find the table.

Now we have installed a new server, with the same db version, the same
content (a restore from the original db) and the same coding.

After setting the search path the query

Select * from vwexternetoegang

produces the required results in the first installation, but in the new
installation, it cannot find the view. However, if I do an explicit

Set search_path to "testschema";

it works as expected.

The only real difference between the 2 installations I see is that the
working installation has a RedHat Enterprise Linux ES Release 4 (Nahant
update1) version versus the new (not working) a SuSE 9.3 installation

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Culwell-Kanarek 2005-09-01 23:20:49 BUG #1859: 3-octet private use UTF8 chars reported as identical
Previous Message Tom Lane 2005-09-01 13:30:15 Re: Sorting Problem in UNICODE/german