[Zope] problem with dtml-var displaying None for NULL from postgres

Thomas B. Passin tpassin@mitretek.org
Fri, 8 Jun 2001 09:42:55 -0400


Another, slightly gruesome possibility is that most databases will let you
select an expression such as ISNULL or IFNULL.  You could use that to return
an empty string from the query:

select ISNULL(thefield,'',thefield)

This will return '' for a null, thefield otherwise.  You'll have to check
the Postgresql docs to see what equivalent expressions it has.

Tom P

[Stefan H. Holek]

>
> IIRC, the ZPyGreSQL DA will also return an empty string for NULL. You
> might want to try that for an easy upgrade. Psycopg is IMHO a far better
> DA though.
>