pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Faiczak <kfaiczak@sandvine.com>
To: pgsql-odbc@postgresql.org
Subject: PGAPI_Columns() does not follow search path
Date: Tue, 29 Mar 2005 11:21:17 -0500
Message-ID: <71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com> (raw)

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
returned 
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' ==
'name'
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
fire

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




Message-ID: <71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com>
Permalink:  ../71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com/
Also on:    postgresql.org/message-id/71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: kfaiczak@sandvine.com
  Subject: Re: PGAPI_Columns() does not follow search path
  In-Reply-To: <71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com>
  References: <71837C040963F748B9B94E123A289678415144@mailserver.sandvine.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox