Re: Bytea/Base64 encoders for libpq - interested?

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: Bytea/Base64 encoders for libpq - interested?
Дата
Msg-id 3.0.5.32.20010829095812.008453f0@192.228.128.13
обсуждение исходный текст
Ответ на Re: Bytea/Base64 encoders for libpq - interested?  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-hackers
At 11:55 AM 28-08-2001 +0200, Karel Zak wrote:
>
> What implement base64 PostgreSQL datetype that use externaly base64 and
>internaly same things as bytea. It prevent FE and parser problems with
>"bad" chars and internaly for data storage save less space than text
>with base64. Of course it doesn't solve a problem with encoding/decoding 
>data in your application to/from base64. May be implement for this
>datetype cast to/from bytea too.
>
> SELECT my_bytea::base64 FROM foo;
>
> INSERT INTO foo (my_bytea) VALUES ('some_base64_string'::bytea);
>
> And you can still fetch all data directly in batea by binary cursor. 
>
> Comments?

Sounds good to me. Even better if the base64 parser is bulletproof and
tolerant of junk. That way base64 email attachments may not even need to be
processed much - just filter a bit and shove it in :).

But shouldn't there be a ::base64 somewhere in the insert statement?

Cheerio,
Link.



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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: NetBSD 1.5.1(HP300)
Следующее
От: Lincoln Yeoh
Дата:
Сообщение: Re: Bytea/Base64 encoders for libpq - interested?