Re: [Review] Tests citext casts by David Wheeler.

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ryan Bradetich <rbradetich(at)gmail(dot)com>
Subject: Re: [Review] Tests citext casts by David Wheeler.
Date: 2008-09-12 18:21:53
Message-ID: 1076562A-DE44-4A6C-8ABC-AF4B2D7922C9@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 12, 2008, at 11:14, David E. Wheeler wrote:

> Pity. Looks like there were only a few I wasn't using, text_char,
> char_text, text_name, and texttoxml.

Oh, and text_name seems to give me this error:

ERROR: compressed data is corrupt

That's when I have this cast:

CREATE OR REPLACE FUNCTION citext(name)
RETURNS citext
AS 'text_name'
LANGUAGE internal IMMUTABLE STRICT;

This version does not give me an error:

CREATE OR REPLACE FUNCTION citext(name)
RETURNS citext
AS 'SELECT text( $1 )::citext'
LANGUAGE SQL IMMUTABLE STRICT;

Maybe I did something wrong?

Thanks,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-09-12 18:31:40 Re: [Review] Tests citext casts by David Wheeler.
Previous Message Alvaro Herrera 2008-09-12 18:14:21 Re: [HACKERS] Infrastructure changes for recovery