Re: MySQL Compatibility WAS: 8.5 release timetable, again - Mailing list pgsql-hackers

From Greg Stark
Subject Re: MySQL Compatibility WAS: 8.5 release timetable, again
Date
Msg-id 407d949e0908261904g3440b4b8w7516cb0c55b87f3c@mail.gmail.com
Whole thread Raw
In response to Re: MySQL Compatibility WAS: 8.5 release timetable, again  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Aug 27, 2009 at 1:24 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Greg Stark <gsstark@mit.edu> writes:
>> Actually it always bothered me that we don't have implicit casts from
>> integer->boolean. I can't see any ambiguity or unintentional effects
>> this would cause problems with. Am I missing something?
>
> Personally, as an old Pascal-lover, I always thought that C's failure
> to distinguish between int and boolean was the single biggest design
> mistake in the language.  I'm very glad that SQL doesn't make that
> mistake, and I don't want to go against the standard to introduce it.

I'm sure I can think of bigger flaws in C than that :)

I tend to think SQL has more in common with lisp than either of those,
perhaps because of the tinge of functional programming style.

But I think you're generalizing my suggestion to the point of building
a straw man to say "failure to distinguish". You could argue that
using a boolean in places where integers are expected could be
confusing or dangerous. But using other data types where boolean
values are expected is perfectly reasonable and safe -- especially in
cases like integer where people do expect it to work and the behaviour
is very predictable.

--
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8,
Next
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] pgsql: Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8,