Re: DBD::Pg BYTEA Character Escaping
| От | David Wheeler |
|---|---|
| Тема | Re: DBD::Pg BYTEA Character Escaping |
| Дата | |
| Msg-id | 1006118491.729.4.camel@mercury.atomicode.com обсуждение исходный текст |
| Ответ на | Re: DBD::Pg BYTEA Character Escaping (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: DBD::Pg BYTEA Character Escaping
|
| Список | pgsql-general |
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
Вложения
В списке pgsql-general по дате отправления: