From: | Dmitriy Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Andy Colson <andy(at)squeakycode(dot)net> |
Cc: | Andre Lopes <lopes80andre(at)gmail(dot)com>, postgresql Forums <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Store base64 in database. Use bytea or text? |
Date: | 2011-01-25 22:39:35 |
Message-ID: | AANLkTi=0mgmuG41bVHKBWaN1suNUWqENHrdRKqRGYrZ_@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2011/1/26 Andy Colson <andy(at)squeakycode(dot)net>
> On 1/25/2011 4:27 PM, Andre Lopes wrote:
>
>> Hi,
>>
>> I need to put some images on Base64 in a PostgreSQL database. Wich
>> type should I use and what is the difference between using bytea or
>> text to store Base64?
>>
>> Best Regards,
>>
>>
> If they are encoded in base64, use text. Use bytea if you dont want to
> encode them.
>
Or *store* in bytea by using decode() function and retrieve
in base64 by using encode() function.
http://www.postgresql.org/docs/9.0/static/functions-string.html
>
> -Andy
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
// Dmitriy.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2011-01-25 22:39:59 | Re: Store base64 in database. Use bytea or text? |
Previous Message | Andy Colson | 2011-01-25 22:33:44 | Re: Store base64 in database. Use bytea or text? |