[Zope] SQLTEST is case insensitive?

The Doctor What docwhat@gerf.org
Tue, 6 Mar 2001 23:49:36 -0600


I have the following ZSQL method:
SELECT "URL"."ID",
       "val_Protocol"."Protocol",
       "URL",
       "URL"."Name",
       "URL"."Description",
       "URL"."Created"
FROM "URL",
     "val_Protocol"
<dtml-sqlgroup where>
  <dtml-sqltest ID type=int optional>
<dtml-and>
  "val_Protocol"."ID" = "URL"."val_ProtocolID"
</dtml-sqlgroup>


When I set ID equal to 1 (to test) I get this back:
Error, psycopg.ProgrammingError:
ERROR: Attribute 'id' not found

SELECT "URL"."ID",
       "val_Protocol"."Protocol",
       "URL",
       "URL"."Name",
       "URL"."Description",
       "URL"."Created"
FROM "URL",
     "val_Protocol"
where
(ID = 1
 and "val_Protocol"."ID" = "URL"."val_ProtocolID"
)

The problem is two fold:
1) ID = 1 should be "ID" = 1 so that PostgreSQL will treat it as a
case sensitive string.
2) ID = 1 should really be "URL"."ID", but I can't figure out how to
pass that through sqltest!

Any help is appreciated....

I have tried this with a zpopyda and zope-psycopgda, neither worked.

And, no, using 'as' to rename the select to lowercase _does not_ work.

Ciao!

-- 
"Clothes make the man.  Naked people have little or no influence on society."
	-- Mark Twain

The Doctor What: Not that 'who' guy              http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC