| От | Joe Conway |
|---|---|
| Тема | Re: Using TEXT columns for binary content |
| Дата | |
| Msg-id | 3EA41D87.4050907@joeconway.com обсуждение исходный текст |
| Ответ на | Re: Using TEXT columns for binary content (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Tom Lane wrote: > Joe Conway <mail@joeconway.com> writes: > >>1) You have to encode to base64 on the way in (bytea has to be escaped >> on INSERT/UPDATE too) >>2) You have to decode to binary on the way out (depending on your >> middleware, you can use a binary cursor for bytea and avoid the >> decode on SELECT) > > Note that the 7.4 protocol should make it a lot easier to use bytea for > binary data without any escaping ... although some amount of client > reprogramming would be needed ... > Yeah -- client library support (e.g. PHP, Python, etc) will probably lag 7.4's release by a bit, but I expect bytea will become the most sensible option once everything is in place. Even now, I find bytea use for small images pretty quick and easy (with PHP at least). Joe
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера