Re: boolean <=> text explicit casts - Mailing list pgsql-patches

From Neil Conway
Subject Re: boolean <=> text explicit casts
Date
Msg-id 1180551724.6648.90.camel@goldbach
Whole thread Raw
In response to Re: boolean <=> text explicit casts  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: boolean <=> text explicit casts  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
On Mon, 2007-28-05 at 15:38 -0400, Tom Lane wrote:
> More generally, I'm really hoping to get rid of bespoke text<->whatever
> cast functions in favor of using datatypes' I/O functions.  To what
> extent can we make the boolean I/O functions serve for this?  It seems
> relatively painless on the input side --- just allow whitespace --- but
> I suppose we can't change boolout's historical result of "t"/"f" without
> causing problems.

Attached is a revised version of this patch that modifies boolin() to
ignore leading and trailing whitespace. This makes text => boolean
trivial, but boolean => text is still distinct from boolout().

Barring any objections, I'll apply this later today or tomorrow.

-Neil


Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: 2nd-generation buffer ring patch
Next
From: Jeff Davis
Date:
Subject: Re: Seq scans status update