Re: Which data type to use for UTF8 JSON and perl/PHP: varchar, text or bytea?

Поиск
Список
Период
Сортировка
От Alexander Farber
Тема Re: Which data type to use for UTF8 JSON and perl/PHP: varchar, text or bytea?
Дата
Msg-id CAADeyWiZUz92pnz9jQj0gYJ69bGhrd8EA06JA-+R7nre=iQd4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Which data type to use for UTF8 JSON and perl/PHP: varchar, text or bytea?  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Which data type to use for UTF8 JSON and perl/PHP: varchar, text or bytea?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Hello,

On Thu, Apr 26, 2012 at 10:11 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> Does anybody have an advice on what data type
>> to use best for such a JSON "string"?
>>
>> Should I take varchar, text or bytea.
>>
>> And for the latter - how to handle it in Perl
>> if I currently use DBI and DBD::Pg?
>>
>> For PHP I probably should use pg_(un)escape_bytea?
>>
>> (And does this all work with "?" placholders?)
>
> upgrade your database and use the new json type/features.

do you mean PostgreSQL 9.x?

I don't see anything "json" at
http://www.postgresql.org/docs/9.0/static/datatype.html
or in the search (besides something in "contrib")?

And does it work well with Perl 5.10 and PHP 5.3?

My hoster offers CentOS 6.x only

Regards
Alex

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

Предыдущее
От: Dmitry Koterov
Дата:
Сообщение: Difference between speed of 2 functions: SQL+STABLE and PLPGSQL+EXECUTE
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Which data type to use for UTF8 JSON and perl/PHP: varchar, text or bytea?