Re: boolean <=> text explicit casts

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: boolean <=> text explicit casts
Дата
Msg-id 1180551724.6648.90.camel@goldbach
обсуждение исходный текст
Ответ на Re: boolean <=> text explicit casts  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: boolean <=> text explicit casts  (Peter Eisentraut <peter_e@gmx.net>)
Список 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


Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: 2nd-generation buffer ring patch
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Seq scans status update