Re: interpret bytea output as text / double encode()

From: Stefan Froehlich <postgresql(at)froehlich(dot)priv(dot)at>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: interpret bytea output as text / double encode()
Date: 2014-06-06 13:37:59
Message-ID: 20140606133758.GA601@Debian-60-squeeze-64-minimal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > # select encode(encode(column, 'escape'), 'escape')

> Any chance you can encode() into temp table then encode() the result.

Don't think so, PostgreSQL will recognize the temp column either as text
or as bytea and then refuse either the insert or the encode() because of
a type mismatch.

Any workaround for this would most likely solve my original problem
without the use of a temp table.

Stefan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2014-06-06 13:39:28 Re: Trigger to convert UNIX time to timestamp without time zone.
Previous Message Adrian Klaver 2014-06-06 13:35:33 Re: Trigger to convert UNIX time to timestamp without time zone.