On Sat, 2001-11-17 at 21:46, Tom Lane wrote:
> Offhand I don't think you even need the check on the datatype; wouldn't
> it be faster and safer to do the substitution unconditionally? I can't
> see that there are any cases that work without this substitution and
> fail with it.
In that case, I suggest the attached, even more simplified patch. It
assumes that the quote character stored in $lp in the existing version
is always "'" (a safe assumption for DBD:Pg, I think, in a way it wasn't
for DBI, from whence the code for the LITERAL_PREFIX and LITERAL_SUFFIX
was copied into DBD::Pg), and therefore performs the escaping of the
three agreed-upon characters for all non-numeric data types.
If you agree that this tack makes sense, I'll submit the patch to Edmund
Mergl.
Regards,
Daviid
--
David Wheeler AIM: dwTheory
David@Wheeler.net ICQ: 15726394
Yahoo!: dew7e
Jabber: Theory@jabber.org