From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: beyaNet Consultancy <beyanet@ntlworld.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Read bytea column from table and convert into base64.....
Date: Mon, 8 Mar 2004 09:24:23 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0403080923390.29173-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <30AF055A-6F01-11D8-B866-0003938366A4@ntlworld.com>
O kyrios beyaNet Consultancy egrapse stis Mar 5, 2004 :
> Hi,
> I have a bytea column which I want to convert into base64. At the
> moment I am reading the bytea colum into my java app as a byte[]. I am
> then calling another static method to convert the byte[] into base64. I
> want postgreSQl to handle the conversion so my app can read in the
> base64 string.
>
> So for example:
>
> select (base64)byteaColumn from tableName where artistID = x
You can use encode function as :
select encode(byteaColumn,'base64') from tableName where artistID = x
>
> many thanks in advance
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
-Achilleus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: achill@matrix.gatewaynet.com, beyanet@ntlworld.com
Subject: Re: Read bytea column from table and convert into base64.....
In-Reply-To: <Pine.LNX.4.44.0403080923390.29173-100000@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox