Re: Casting INT4 to BOOL... - Mailing list pgsql-patches

From Tom Lane
Subject Re: Casting INT4 to BOOL...
Date
Msg-id 10745.1097423151@sss.pgh.pa.us
Whole thread Raw
In response to Casting INT4 to BOOL...  (Sean Chittenden <chitt@speakeasy.net>)
Responses Re: Casting INT4 to BOOL...
Re: Casting INT4 to BOOL...
List pgsql-patches
Sean Chittenden <chitt@speakeasy.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

pgsql-patches by date:

Previous
From: Reini Urban
Date:
Subject: Re: cypg.dll, libpq_a, initdb max_connections 60
Next
From: Tom Lane
Date:
Subject: Re: Slightly better testing for pg_ctl(1)'s -w...