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

From: Dick Kniep <dick(dot)kniep(at)lindix(dot)nl>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1858: setting search path in select doesn't (always) work
Date: 2005-09-03 09:46:05
Message-ID: 200509031146.05479.dick.kniep@lindix.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi list,

I reported the bug because I was convinced it was something fishy, however,
the bug I reported proved to be something completely else. I don't even know
if it is a bug at all. If you do a set search_path; the path is set
correctly according to the rules of autocommit and everything else.

If however you are not authorized to use the schema, the next query on a table
within the requested schema results in a table not found condition, which
makes sense, because it actually cannot find the table, because it cannot
enter the schema.

I have checked the way psycopg handles this, and if a select is done on the
table this is working correctly,

File "/home/dick/CVix/CVix/src/ObjectBuilder.py", line 516, in __BldTabDef
cur.execute(Sqlstmt)
psycopg.ProgrammingError: ERROR: permission denied for schema adeuxproductie

Select * from "adeuxproductie"."parameters" WHERE 1=0

so the problem must be within Zope and I will report this problem to the Zope
community.

Thanks for all your help.

Op vrijdag 2 september 2005 17:12, schreef Michael Fuhr:
> On Fri, Sep 02, 2005 at 10:58:12AM -0400, Tom Lane wrote:
> > "D.J. Kniep" <dick(dot)kniep(at)lindix(dot)nl> writes:
> > > 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.
> >
> > What does "show search_path" report in the failing and non-failing
> > states? Also try "select current_schemas(true)".
>
> This thread came up in pgsql-general yesterday; Dick says the real
> problem was something else.
>
> http://archives.postgresql.org/pgsql-general/2005-09/msg00074.php

Cheers,
Dick Kniep

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-09-03 14:28:29 Re: BUG #1861: Possible Incompatibly with NOD32 AV.
Previous Message Thomas Turn Jensen 2005-09-03 01:06:55 BUG #1861: Possible Incompatibly with NOD32 AV.