Bugs item #1429248, was opened at 2006-02-10 17:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1429248&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Hootbah (hootbah)
Assigned to: Nobody/Anonymous (nobody)
Summary: tableExists query issues with uper case table names
Initial Comment:
Its is possible for the tableExists query not to find a
table when it does actually exist.
When using uppercase names e.g.
class sqlmeta:
table = 'MYTABLE'
The tableExists query becomes:
SELECT COUNT(relname) FROM pg_class WHERE relname =
'MYTABLE'
This fails to find the table as the table names stored
within pg_class are all lower case.
I propose to change the query to be:
SELECT COUNT(relname) FROM pg_class WHERE relname =
lower('MYTABLE')
This would mean a change to pgconnection.py:
result = self.queryOne("SELECT COUNT(relname) FROM
pg_class WHERE relname = lower(%s)"
% self.sqlrepr(tableName))
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1429248&group_id=74338
|