Re: encode, lower and 0x8a

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Michael Artz <mlartz(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: encode, lower and 0x8a
Date: 2007-01-30 06:02:49
Message-ID: 20070130060249.GA99997@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 29, 2007 at 12:52:33PM -0500, Michael Artz wrote:
> On 1/27/07, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> >SELECT decode(lower(textin(byteaout(bytes))), 'escape') FROM mytable;
>
> That seems to work correctly, however I missed the functions textin'
> and 'byteaout' in the docs ... are they documented somewhere?

Those are the types' input/output functions. They're not specifically
documented but "User-Defined Types" in the "Extending SQL" chapter
discusses the concept; see also CREATE TYPE.

http://www.postgresql.org/docs/8.2/interactive/xtypes.html
http://www.postgresql.org/docs/8.2/interactive/sql-createtype.html

Using the input/output functions is a bit hackish since, as you
discovered, their exact behavior isn't documented.

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Panther 2007-01-30 06:07:16 SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?
Previous Message Sim Zacks 2007-01-30 05:56:32 Re: PG Email Client