Issue when using schema with camel case (v3.1.4-v3.1.5)
Posted: Wed 21 Mar 2012 14:57
Hello,
I have an issue since PgDac v3.1.5 (V2 was ok).
Bug tested under D7/D2010/Posgresql9.x
How to reproduce:
Rename public schema to Public for instance.
(1)
Try to connect with a TPgconnection.
You got: invalid parameter for "search path" : "public"
(2)
Try to call PgConnection1.GetTableNames(MyListbox, false).
(You must have AllTable parameter to False)
GetTableNames() returns nothing because the generated query is malformed (escaping issue).
The where clause is
WHERE n.nspname = '\"Public\"'
but should be
WHERE n.nspname = 'Public'
(3)
Now with release 3.1.5 we can have a dot in schema.
But GetTableName() still failing.
Due to same escaping issue I think.
Many Thanks,
Syagrius
I have an issue since PgDac v3.1.5 (V2 was ok).
Bug tested under D7/D2010/Posgresql9.x
How to reproduce:
Rename public schema to Public for instance.
Code: Select all
ALTER SCHEMA public RENAME TO "Public";
Try to connect with a TPgconnection.
You got: invalid parameter for "search path" : "public"
(2)
Try to call PgConnection1.GetTableNames(MyListbox, false).
(You must have AllTable parameter to False)
GetTableNames() returns nothing because the generated query is malformed (escaping issue).
Code: Select all
SELECT current_database() AS TABLE_CATALOG, n.nspname AS TABLE_SCHEMA, c.relname AS TABLE_NAME, c.oid AS TABLE_OID, CASE WHEN c.relkind = 'r' THEN 'TABLE' WHEN c.relkind = 'v' THEN 'VIEW' END::varchar(5) AS TABLE_TYPE FROM pg_class c INNER JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE n.nspname = '\"Public\"' AND c.relkind IN ('r', 'v') ORDER BY n.nspname, c.relname
WHERE n.nspname = '\"Public\"'
but should be
WHERE n.nspname = 'Public'
(3)
Now with release 3.1.5 we can have a dot in schema.
But GetTableName() still failing.
Due to same escaping issue I think.
Many Thanks,
Syagrius