On Tuesday 05 February 2008 06:13:41 pm Ed Leafe wrote: > On Feb 5, 2008, at 7:52 PM, johnf wrote: > > So, you'll need to quote the table name when you create it. But this > > means that you'll *always* have to quote references to it. > > Yes, I know that - I've been dealing with that since I started > working here. Apparently, several years ago someone used a tool to > migrate their data into Postgres, and it defaulted to case-sensitive > names. Now so much code exists that it would be more of a pain to > change it. > > The problem seems to be that getTables() is not working correctly. At > the point in the wizard where it crashes, the connection to the DB has > been made, and the backend object is trying to query the DB for its > tables. If you can point me to a good reference for your getTables > logic, I'll see if I can figure out exactly what's tripping it up. > > -- Ed Leafe
Ed, The code is using a standard postgres function. "has_table_privilege()" and it is not working correctly. It is suppose to provide a simple means to return only the tables the users is allow to use (has min 'SELECT' permissions). http://developer.postgresql.org/pgdocs/postgres/functions-info.html I'm reviewing what is needed to replace the function. Of course we can completely eliminate the test and just return all tables. I'm sure that might cause other issues but then the problem will be permissions. What are you guys using for MySQL to check permissions? Postgres (depending on the verison) uses a series of system tables to store information for meta data. http://www.postgresql.org/docs/8.1/static/catalogs.html As you can see from the link there are lot's of tables. There are many parent child relationships (linked on OID) and it sometimes tuff to determine the relation. But most of the stuff is in pg_tables for getTables() SELECT schemaname || '.' || tablename AS tablename FROM pg_tables WHERE (schemaname not like 'pg_%') and (schemaname not like 'information%' ) will return all tables. And will eliminate the pg's and information type tables. My guess is that will fix your current problem but will not fix the real issue. -- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]
