Re: '= NULL' is not the same as 'IS NULL'

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: greg(dot)campbell(at)us(dot)michelin(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: '= NULL' is not the same as 'IS NULL'
Date: 2006-09-06 23:30:41
Message-ID: 44FF5A21.7030408@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

greg(dot)campbell(at)us(dot)michelin(dot)com wrote:
> I have a question for the mailing list.
> More generally, let us assume that when in Access, you change a record
> focus (after a delete, insert, update. upon opening a form, or moving the
> Access cursor), it may be reasonable to execute one or more SELECT queries
> to refresh the form.
> Why does it tend to use the WHERE clause to match each field value, instead
> of a primary key for a match? What are the conditions that force primary
> key usages vs. "match every field" syntax?
>

From ancient times it's programmers' routine work to verify if the
target record was changed
or not before updat/deleting the record. MS seems to prefer the way to
verify and update/delete
at a time and executes an update/delete query with WHERE clause to
match each field value.
If the query update/deletes exactly one row it means that both the
verification and the execution
are OK. If it update/deletes no row it probably meas that someone
changed the record somewhere.
IMHO it's a lot simpler than the way to get the record with lock and
verify the change by the
program by itself and update/delete the record.

regarsds,
Hiroshi Inoue

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Zubkovsky, Sergey 2006-09-08 13:04:57 COPY ... FROM STDIN
Previous Message greg.campbell 2006-09-06 22:07:44 Re: '= NULL' is not the same as 'IS NULL'