From: Chris Hoover
Sent: Fri 6/4/2004 9:39 PM
To: Jeff Eckermann
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Help with ODBC problem
Ok, I created a new schema and put my view into it giving my reporting
group access to this view only. I also set the search_path in the odbc
driver and as an alter user, but I am still seeing a full db catalog
when I connect to my db via odbc. (link trying to link a table in Access).
Any further ideas? I really need the end users to only see the specific
views/tables I grant them access to when they are an area where they are
able to choose tables/views to view.
I think you'll be out of luck. iirc, when an app asks the ODBC driver what tables exist it just queries pg_class without regard to visibility rules imposed by the schema search path. Technically this is correct, because even without a schema being in the path, a user can still reference it using scheme.table notation.
I suspect your best option would be to hack PGAPI_Tables() in info.c if you absolutely must stop users seeing tables, though the best be would probably be to simply leave the driver as it is, let the users see the tables, but deny them any direct access to them.
Regards, Dave