Re: cast bytea to text - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: cast bytea to text
Date
Msg-id 45E6D822.5070801@iol.ie
Whole thread Raw
In response to cast bytea to text  ("Willy-Bas Loos" <willybas@gmail.com>)
List pgsql-general
Willy-Bas Loos wrote:

> ERROR: function decode(bytea, "unknown") does not exist
> SQL state: 42883
> Hint: No function matches the given name and argument types. You may
> need to
> add explicit type casts.
> Context: SQL function "bytea2text"

That's because the first parameter of decode() should be of type TEXT,
not bytea:

http://www.postgresql.org/docs/8.1/static/functions-binarystring.html#FUNCTIONS-BINARYSTRING-OTHER

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Please Help ! Error with Access 2003
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] urgent: upgraded to 8.2, getting kernel panics