Re: MySQL Compatibility WAS: 8.5 release timetable, again

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: MySQL Compatibility WAS: 8.5 release timetable, again
Date: 2009-08-27 02:04:37
Message-ID: 407d949e0908261904g3440b4b8w7516cb0c55b87f3c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 27, 2009 at 1:24 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Greg Stark <gsstark(at)mit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-08-27 02:10:55 Re: [COMMITTERS] pgsql: Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8,
Previous Message Tom Lane 2009-08-27 02:04:25 Re: [COMMITTERS] pgsql: Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8,