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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Mon, 29 Jan 2007 23:02:49 -0700
  • Message-id: <20070130060249(dot)GA99997(at)winnie(dot)fuhr(dot)org>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group