Dear John,

sorry for not replying to your message directly, but somehow I am  
unable to subscribe to the list and therefore don't recieve any  
messages... (!)

the documentation on pg_table_is_visible can be found here

http://www.postgresql.org/docs/8.1/interactive/functions-info.html#FUNCTIONS-INFO-SCHEMA-TABLE

and the header to this table reads:

QUOTE
Table 9-41 shows functions that 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.
\QUOTE

To my understanding this has nothing to do with security. Access to  
the tables inside a schema are granted separately by "GRANT/REVOKE sth  
ON SCHEMA xy TO/FROM user" statements according to the doc you have  
sent to me. Opposed to that 'pg_table_is_visible' only checks if a  
table with name 'table'  is on the search path, meaning it can be  
referenced without using the 'schema.table' syntax.

Let me know if you see this differently. I will check back to the  
archives regularily until I can fix the problem with subscription.

Kind regards,
Christoph.


Am 14.05.2010 um 17:24 schrieb Christoph Gohle:

> 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
>
>
>

--
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]

Reply via email to