Re: Using TEXT columns for binary content
| От | Joe Conway |
|---|---|
| Тема | Re: Using TEXT columns for binary content |
| Дата | |
| Msg-id | 3EA415D4.5090807@joeconway.com обсуждение исходный текст |
| Ответ на | Using TEXT columns for binary content ("Mircea Sarbu" <msarbu@agora.ro>) |
| Ответы |
Re: Using TEXT columns for binary content
Re: Using TEXT columns for binary content |
| Список | pgsql-general |
Mircea Sarbu wrote:
> There are some hidden drawbacks for this approach? (I don't need any further
> processing on the binary content)
>
There are people who have reported using this method successfully on the
Postgres lists. Only downsides I can think of are:
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)
3) The on disk representation is about 33% bigger compared to bytea
4) TEXT datatype is subject to being multibyte encoded -- I don't think
this affects the characters in the base64 set, but I'm not sure there
won't be any undesireable interactions. If you are using other than
'C' locale, test carefully.
Joe
В списке pgsql-general по дате отправления: