Skip site navigation (1) Skip section navigation (2)

Re: Customised Encoding

From: Richard Huxton <dev(at)archonet(dot)com>
To: "kumar" <sgnerd(at)yahoo(dot)com(dot)sg>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Customised Encoding
Date: 2004-04-27 13:16:16
Message-ID: 200404271416.16156.dev@archonet.com (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-sql by date

Next:From: Luiz Rafael Culik GuimaraesDate: 2004-04-27 14:48:48
Subject: query optimizer dont treat correctly OR
Previous:From: kumarDate: 2004-04-27 12:26:04
Subject: How to get binary value for an Integer

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group