Postgresql – How to tables be hidden from a user in PostgreSQL 8.1

postgresql

I have a Windows application that needs to integrate to an existing PostgreSQL 8.1 database. I'm using the OLE driver from http://www.pgoledb.com/.

This particular application tries to load the details of every table even though it only needs access to one. If I don't grant the user permission to select from all of these tables, the application throws an error as it tries to load each one. If I do grant the user permission to select from all of these tables, the application loads all of their meta data very slowly.

I can't seem to find a way to "hide" most of the tables so that the application won't even know they exists and won't try to do anything with them. Does such a feature/permission exist? Would creating another schema help (there's currently just one "public" schemea)? Is there a OLE feature that might help?

(Note I don't really care if the application can access these tables from a security standpoint, I just want to speed things up for the users of this app.)

Best Answer

I think the solution revolves around this simple question, is the one table that the Windows system needs access to part of an existing system that other applications need access to? Or is it a separate table that is only used by the Windows app?

If it's the latter a new schema with just that one table would indeed seem to be the answer.

If it's the former, permissions are the key. Create a new user that the Windows app will connect as, and then only grant access to that one table to that user. See: http://www.postgresql.org/docs/8.4/static/privileges.html

Related Topic