#1201: double quotes in the SQL request in getTables() in dbPostgreSQL are not
escaped
---------------------+------------------------------------------------------
  Reporter:  fabix   |       Owner:  somebody
      Type:  defect  |      Status:  new     
  Priority:  major   |   Milestone:  0.9.2   
 Component:  ui      |     Version:  0.9.1   
Resolution:          |    Keywords:          
---------------------+------------------------------------------------------
Comment (by fabix):

 Replying to [comment:3 johnf]:
 > OK.  And thanks for testing.  The reason for the double quotes had to do
 with case.  If the name of the Schema had upper case letters then the
 select would fail.  Are you using unicode?  I think Ed made the change to
 help someone recently.  Could you provide a simple example of your schema?
 Something like the name of the schema along with the "create" for a small
 table.  And I'll test a sometime tonight on my laptop which has 8.3.x.
 Thanks for reporting the issue.

 I keep double quotes for has_table_privilege() because that works with
 them. I precise the problem is when I use "Add Controls from Data
 Environment".

 On PostgreSQL 8.2.4 :

 {{{
 test=#> select schemaname, tablename from pg_tables where
 has_schema_privilege('"'||schemaname||'"','usage');
 ERREUR:  le schéma « "pg_catalog" » n'existe pas
 }}}
 fails and
 {{{
 test=#> select has_schema_privilege('"public"','usage');
 ERREUR:  le schéma «"public"» n'existe pas
 }}}
 fails too. But
 {{{
 test=# create SCHEMA "TesT";
 CREATE SCHEMA
 test=# create table "TesT".societe (id_societe serial, raisonsoc text,
 adresse text);
 NOTICE:  CREATE TABLE créera des séquences implicites «
 societe_id_societe_seq » pour la colonne serial « societe.id_societe »
 CREATE TABLE
 test=# select schemaname, tablename from pg_tables where
 has_schema_privilege(schemaname,'usage');
 }}}
 works. So, removing double quotes for has_schema_privilege() works with
 upper case letters. And that doesn't work if double quotes are present
 (test with "public" schema).

-- 
Ticket URL: <http://trac.dabodev.com/ticket/1201#comment:4>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo

_______________________________________________
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