From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Kaare Rasmussen <kaare(at)jasonic(dot)dk>, pgsql-advocacy(at)postgresql(dot)org |
Subject: | Re: We aren't a relational database ... ? |
Date: | 2007-10-09 19:30:43 |
Message-ID: | 1191958243.19081.31.camel@dogma.ljc.laika.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy |
On Tue, 2007-10-09 at 12:13 -0700, David Fetter wrote:
> On Tue, Oct 09, 2007 at 11:48:35AM -0700, Jeff Davis wrote:
> > On Tue, 2007-10-09 at 09:44 +0200, Kaare Rasmussen wrote:
> > > > In SQL, "=" is both an assignment operator (e.g. UPDATE) and a
> > > > comparison operator (e.g. WHERE clause). There are
> > > > nondeterministic
> > >
> > > Why would that be a problem when they occur in different parts of
> > > the statement?
> >
> > It can actually be in the same part of the statement:
> >
> > UPDATE foo SET b = a = 0;
>
> Don't Do That(TM).
Right, I don't; it was completely contrived. I am not making any attempt
to be elegant with such a statement.
I'm just trying to point out that, if there's a complex update statement
it might do something unexpected if you have a bug. Other languages have
different assignment and comparison operators to avoid these situations,
and I think it helps people catch bugs (and makes it easier to parse,
I'm sure).
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Kaare Rasmussen | 2007-10-09 20:00:08 | Re: We aren't a relational database ... ? |
Previous Message | David Fetter | 2007-10-09 19:13:23 | Re: We aren't a relational database ... ? |