Thread: ODBC Schema problems - Postgres 7.3

ODBC Schema problems - Postgres 7.3

From
Michalis Kabrianis
Date:
Hi all

I'm developing a multi-user application for Postgresql with wxWindows and ODBC

My .odbc.ini file is:

[ODBC Data Sources]
Media = Media SA Development Database
[Media]
Database                = mediaerp
Servername              = localhost
ReadOnly = 0
Driver          = /server/postgresql/lib/psqlodbc.so
Port            = 5432
Protocol                = 7.2
ConnSettings            = SET SEARCH_PATH to public,admin;

The psqlodbc.so file is from psqlodbc-07.03.0100 downloaded from gborg.postgresql.org and the database is 7.3. (also
triedProtocol = 7.3, although I think it doesn't make any difference). 

There is a schema on the user admin (and as admin I have GRANTED select on all tables/sequences to users)
I connect as user "mkab" and I see in Postgres server.log the command
SET SEARCH_PATH to public,admin
But when I try to select something from a table named "doy" of the admin schema, I see that the DB is looking for the
table"doy" in mkab's schema. Then it does a "select" on the table named "doy" and returns nothing. 
Is that normal, am I doing something wrong or is there a bug in odbc library? Everything works as expected when I
connectas "admin". 

Thanks in advance

Part of the server log to follow
2003-07-07 20:49:16 LOG:  connection received: host=127.0.0.1 port=33426
2003-07-07 20:49:16 LOG:  connection authorized: user=mkab database=mediaerp
2003-07-07 20:49:17 LOG:  query: select version()
2003-07-07 20:49:17 LOG:  duration: 0.001410 sec
2003-07-07 20:49:17 LOG:  query: set DateStyle to 'ISO'
2003-07-07 20:49:17 LOG:  duration: 0.000236 sec
2003-07-07 20:49:17 LOG:  query: set geqo to 'OFF'
2003-07-07 20:49:17 LOG:  duration: 0.000077 sec
2003-07-07 20:49:17 LOG:  query: SET SEARCH_PATH to public,admin
2003-07-07 20:49:17 LOG:  duration: 0.000146 sec
2003-07-07 20:49:17 LOG:  query: select oid from pg_type where typname='lo'
2003-07-07 20:49:17 LOG:  duration: 0.003538 sec
2003-07-07 20:49:17 LOG:  query: select pg_client_encoding()
2003-07-07 20:49:17 LOG:  duration: 0.000497 sec
2003-07-07 20:49:19 LOG:  query: BEGIN;select relname, nspname, relkind from pg_catalog.pg_class,
pg_catalog.pg_namespacewhere relkind in ('r', 'v') and nspname like 'mkab' and relname like 'doy' and relname !~
'^pg_|^dd_'and pg_namespace.oid = relnamespace order by nspname, relname 
2003-07-07 20:49:19 LOG:  duration: 0.006647 sec
2003-07-07 20:49:19 LOG:  query: SELECT code,name FROM doy
2003-07-07 20:49:19 LOG:  duration: 0.001148 sec


--
Michalis Kabrianis
mk@interzone.gr