Re: cast bytea to text

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: cast bytea to text
Дата
Msg-id AFCCBB403D7E7A4581E48F20AF3E5DB2017A6FFC@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Ответ на cast bytea to text  ("Willy-Bas Loos" <willybas@gmail.com>)
Ответы Re: cast bytea to text
Список pgsql-general
> How can i cast bytea to text?
> I´ve read about the DECODE function, but my 8.1 backend
> doesn´t recognize it.
> I´m trying to create an implicit cast using the function:
>
> create or replace function bytea2text(bytea) returns text as
> $$
> select DECODE($1, 'escape');
> $$
> language sql strict;
>
> Answer:
> ERROR: function decode(bytea, "unknown") does not exist

Try ENCODE instead of DECODE ...

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Constructors for dates, times, and timestamps
Следующее
От: George Nychis
Дата:
Сообщение: get username of user calling function?