Skip site navigation (1) Skip section navigation (2)

PGAPI_Columns() does not follow search path

From: "Ken Faiczak" <kfaiczak(at)sandvine(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: PGAPI_Columns() does not follow search path
Date: 2005-03-29 16:21:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Trying to get the columns though odbc
we have a namespace 'user' so when we log in as that user
and the searchpath is $user,public

when queried for columns from a table that exists in public
the postgres-unixodbc driver specifically does a select current_schema()
and uses that to restrict the queries to the namespace 'user'
(all other SQL queries don't do this and allow the full search_path())

if I do the same query without the namespace restriction the columns are
as expected.

Is there a particular reason why this query is limited to the namespace.

I notice there is a specific workaround if the 'specified name space' ==
then it will try public as well but only if current == public
but since there is a current namespace == the user this code doesn't

This looks like someone trying to solve somewhat the same problem,
would it not be better to just remove the namespace restriction 
and let it follow the search_path.

Ken Faiczak


pgsql-odbc by date

Next:From: SimeĆ³ ReigDate: 2005-03-29 16:23:42
Subject: Re: Driver maintenance continuation
Previous:From: Joshua D. DrakeDate: 2005-03-29 16:04:00
Subject: Re: Driver maintenance continuation

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group