DBD::Pg, bytea type

Поиск
Список
Период
Сортировка
От Alex Pilosov
Тема DBD::Pg, bytea type
Дата
Msg-id Pine.BSO.4.10.10103081425560.5069-100000@spider.pilosoft.com
обсуждение исходный текст
Ответы Re: DBD::Pg, bytea type
Re: DBD::Pg, bytea type
Список pgsql-interfaces
Hiyas,

Currently, there's a problem using bytea type transparently with DBD::Pg
driver. Postgres requires you to quote things in a special way to handle
bytea data, for example, to insert a null character, you have to use 
'\000'. Select, on other hand, will require you to uncode such data before
you can actually use it in perl. 

I'm making patches for DBD::Pg which will properly quote bytea data
before insertion and unquote it on select. Let me know if its not a good
idea.

Another thing: Currently, Pg quote() method only will properly escape
backslash if the datatype is not specified. If the datatype is specified,
it'll give wrong result:
$dbh->quote('foo\\bar', SQL_CHAR) will result in 'foo\bar', but it should
result in 'foo\\bar'. Anyone minds if I fix this one as well?

-alex






В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Eivind Andre Fiane Christensen
Дата:
Сообщение: No suitable driver, Using Win2000 connecting to Access
Следующее
От: Michael Davis
Дата:
Сообщение: RE: No suitable driver, Using Win2000 connecting to Access