Re: Customised Encoding - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Customised Encoding
Date
Msg-id 200404271416.16156.dev@archonet.com
Whole thread Raw
In response to Customised Encoding  ("kumar" <sgnerd@yahoo.com.sg>)
List pgsql-sql
On Tuesday 27 April 2004 13:55, kumar wrote:
> Hi Richar,

Kumar - try to make sure you reply to the list.

> It didnt work for me.
>
> select encode('65536'::bytea,'UTF-8')
> ERROR:  Cannot cast type integer to bytea
>
> select encode('65536'::bytea,'UTF-8')
> ERROR:  No such encoding as 'UTF-8'

I think you're using the encode() function wrongly. The second parameter is 
supposed to be something like "base64" or "hex". I'm not sure it makes sense 
to try and cast an integer to a bytea either.

Can you say what you're trying to achieve here?

--  Richard Huxton Archonet Ltd


pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: How to get binary value for an Integer
Next
From: "Luiz Rafael Culik Guimaraes"
Date:
Subject: query optimizer dont treat correctly OR