dabo Commit
Revision 4797
Date: 2008-12-08 10:08:11 -0800 (Mon, 08 Dec 2008)
Author: Johnf
Trac: http://trac.dabodev.com/dabo/changeset/4797

Changed:
U   trunk/dabo/db/dbPostgreSQL.py

Log:
Thanks to Christoph Zwerschke we made a change that better supports and reports 
issues with schema's.

Diff:
Modified: trunk/dabo/db/dbPostgreSQL.py
===================================================================
--- trunk/dabo/db/dbPostgreSQL.py       2008-12-07 15:34:28 UTC (rev 4796)
+++ trunk/dabo/db/dbPostgreSQL.py       2008-12-08 18:08:11 UTC (rev 4797)
@@ -88,8 +88,12 @@
        def getFields(self, tableName, cursor):
                """JFCS support for 7.4 and greater
                   Requires that each table have a primary key"""
-               tableNameBreak=tableName.split(".", 1)
-               localSchemaName = tableNameBreak[0]
+               #tableNameBreak=tableName.split(".", 1)
+               #localSchemaName = tableNameBreak[0]
+               try:
+                       localSchemaName, localTableName = tableName.split(".", 
1)
+               except ValueError:
+                       raise ValueError("Please use schema-qualified 
datasource names " "(e.g. 'public.%s')" % tableName)
                localTableName = tableNameBreak[1]
 
                cursor.execute("""SELECT a.attname, t.typname from pg_attribute 
a, pg_type t, pg_class c 




_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to