On Monday 08 December 2008 09:36:39 am Christoph Zwerschke wrote:
> Another small problem: It seems with PostgreSQL you must always qualify
> your datasource name with a schema name, otherwise you will get a
> confusing IndexError. In order to get a better error message, I suggest
> replacing the following code in dbPostgreSQL
>
>     tableNameBreak=tableName.split(".", 1)
>     localSchemaName = tableNameBreak[0]
>     localTableName = tableNameBreak[1]
>
> with this (appears 2 times):
>
>     try:
>         localSchemaName, localTableName = tableName.split(".", 1)
>     except ValueError:
>         raise ValueError("Please use schema-qualified datasource names"
>             " (e.g. 'public.%s')" % tableName)
>
> Another option would be to determine the schema name automatically using
> the current_schemas() and is_visible() functions of Postgres, or to
> check for the first matching name in getTables(). But that would mean
> the application will be dependent on the search path (which may be good
> or bad). Another option would be to simply assume "public", but "In the
> face of ambiguity, refuse the temptation to guess."
>
> -- Christoph


Thanks Christoph I'm made the changes.  

With respect to the schema question we had some discussions.  I at first 
attempted to use the user name to determine the correct schema and decided 
against it.  And I looked into other possible solutions too.  In the end I 
decided on just allowing the developer to address the issue while creating 
the bizobj.   



-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to