Hi again,
some time ago I wrote about a problem in Class Designer where none but
the public schema tables columns could be seen in ClassDesigner when
doing an 'Add From Data Environment' operation while using a postgres
database, version 8.1 (see below).
I finally found a workaround (maybe a fix) to the postgresql database
driver:
--- dbPostgreSQL.py~ 2009-04-09 00:10:54.000000000 +0200
+++ dbPostgreSQL.py 2010-05-14 16:47:20.000000000 +0200
@@ -164,7 +164,7 @@
" ('ctid', 'cmin', 'cmax', 'tableoid',
'xmax', 'xmin')")
sql.append("AND has_schema_privilege(n.oid, 'usage')"
" AND has_table_privilege(c.oid, 'select')"
- " AND pg_table_is_visible(c.oid)"
+# " AND pg_table_is_visible(c.oid)"
" ORDER BY c.relname, a.attname")
cursor.execute(' '.join(sql))
fields = []
Looking at the postgres documentation: pg_table_is_visible "...
determine whether a certain object is visible in the current schema
search path. A table is said to be visible if its containing schema is
in the search path and no table of the same name appears earlier in
the search path. This is equivalent to the statement that the table
can be referenced by name without explicit schema qualification."
but since no explicit search path is set in 'dbPostgreSQL.py' (I
think), the table is never visible unless it is in ('$user', public).
Since the driver always uses fully qualified names of the form
schema.table (as far as I can see), 'pg_table_is_visible' is
inappropriate here.
I hope my analysis is right and it saves some headaches.
Greetings,
Christoph.
Am 14.01.2010 um 09:36 schrieb Christoph Gohle:
> Hi,
>
> I am new to dabo and this might be a stupid question but I could not
> find any help via google.
>
> I am trying to use dabo 0.9.2 with a postgresql 8.1 database.
>
> When using ClassDesigner.py and trying to create a form using the
> 'Add From Data Environment' wizard, I can connect to my database and
> get all my tables listed in the combobox 'Select Table' in the
> 'Select Fields to Add' page. However, the 'fields' list stays empty
> for every but the public schema tables.
>
> Am I doing something wrong?
>
> Greetings,
> Christoph.
> --
> Christoph Gohle
> _____________
> Fakultät für Physik
> Ludwig-Maximilians Universität München
> Schellingstrasse 4
> 80799 München
>
> [email protected]
> tel: +49 89 2180 6125
> fax: +49 89 2180 63851
>
>
>
--
Christoph Gohle
_____________
Fakultät für Physik
Ludwig-Maximilians Universität München
Schellingstrasse 4
80799 München
[email protected]
tel: +49 89 2180 6125
fax: +49 89 2180 63851
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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]