Re: Casting INT4 to BOOL...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <chitt(at)speakeasy(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Casting INT4 to BOOL...
Date: 2004-10-10 15:45:51
Message-ID: 10745.1097423151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Sean Chittenden <chitt(at)speakeasy(dot)net> writes:
> Is there any reason why the backend doesn't cast an unquoted integer to
> a boolean value?

Hidden cross-category typecasts are evil. I'd accept this as an
explicit cast ('e' in pg_cast) but not automatic.

Also, what about the other direction? Providing a cast in only one
direction is pretty inconsistent.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-10-10 16:00:47 Re: Slightly better testing for pg_ctl(1)'s -w...
Previous Message Reini Urban 2004-10-10 12:42:43 Re: cypg.dll, libpq_a, initdb max_connections 60