The best solution would be to have the ODBC translate instances of '= 
NULL' into IS NULL before submitting the query to PostgreSQL. I'm 
sure this is how other vendors, like Oracle handle the issue. Well, 
probably sure... :-)

Mike Mascari
mascarm@mascari.com

-----Original Message-----
From:	Tom Ivar Helbekkmo [SMTP:tih@kpnQwest.no]
Sent:	Thursday, June 07, 2001 3:18 PM
To:	Tom Lane
Cc:	Stephan Szabo; Mark Stosberg; pgsql-sql@postgresql.org; 
pgsql-hackers@postgresql.org
Subject:	Re: [HACKERS] Re: [SQL] behavior of ' = NULL' vs. MySQL vs. 
Standards

Tom Lane <tgl@sss.pgh.pa.us> writes:

> A compromise answer might be to offer a SET variable that selects 
the
> Microsoft-compatible misimplementation.  Would that fly?

I'd say that's the best way to handle stuff like this.  If you
implement something that breaks the standard, to be compatible with
arrogant programmers at Microsoft who feel that they are above such
things, you're encouraging users to develop bad habits.  Better to
make them go "SET MICROSOFT BUG COMPATIBILITY ON" first.

To see the effect of leniency in re standards, just try to browse
around the web with a browser that rejects incorrect HTML!  :-)


Thu, 7 Jun 2001 15:36:20 -0400
Mike Mascari <mascarm@mascari.com>
RE: [HACKERS] Re: behavior of ' = NULL' vs. MySQL vs. Standards
Mike Mascari <mascarm@mascari.com> writes:

> The best solution would be to have the ODBC translate instances of '= 
> NULL' into IS NULL before submitting the query to PostgreSQL. I'm 
> sure this is how other vendors, like Oracle handle the issue. Well, 
> probably sure... :-)

<applause>

That's the intelligent solution, of course.

-tih
-- 
The basic difference is this: hackers build things, crackers break them.

07 Jun 2001 21:42:32 +0200
Tom Ivar Helbekkmo <tih@kpnQwest.no>
Re: [HACKERS] Re: behavior of ' = NULL' vs. MySQL vs. Standards
Mike Mascari <mascarm@mascari.com> writes:
> The best solution would be to have the ODBC translate instances of '= 
> NULL' into IS NULL before submitting the query to PostgreSQL.

Does Access only talk to Postgres via ODBC?  (Seems plausible, but I
don't know.)  What about people copying-and-pasting queries generated
by Access; is it even possible?

I doubt that this'd really help much, in any case; it merely moves the
necessary switch from the backend to ODBC.

			regards, tom lane

Fri, 08 Jun 2001 11:04:26 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: behavior of ' = NULL' vs. MySQL vs. Standards 
Tom,

> Does Access only talk to Postgres via ODBC?  (Seems plausible, but I
> don't know.) 

	Yes.

 What about people copying-and-pasting queries generated
> by Access; is it even possible?

Yes, but MS Access uses some much non-standard SQL that "= Null" would
hardly be the only problem (try to build an UPDATE ... FROM in Access)

> I doubt that this'd really help much, in any case; it merely moves
> the
> necessary switch from the backend to ODBC.

Yes, but it does avoid cluttering up the PgSQL source with switches that
are only useful to a handful of users.

-Josh


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Fri, 08 Jun 2001 09:53:16 -0700
"Josh Berkus" <josh@agliodbs.com>
Re: [HACKERS] Re: behavior of ' = NULL' vs. MySQL vs. Standards 