Re: [ADMIN] Strange query problem...

2009-01-28 Thread Tom Lane
"Joshua D. Drake" writes: > This looks like a NULL vs '' issue. Am I wrong? No, it's a NULL vs NOT IN issue. Specifically, if the subquery yields any NULLs and the comparison operator is strict (which nearly all are) then it's impossible to get a TRUE result from the NOT IN --- the only possibil

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Kevin Grittner
>>> "Hoover, Jeffrey" wrote: > In Sybase? Sybase ASE defaults to the same behavior as Microsoft SQL Server, but they have a configuration option to yield standards compliant behavior in this regard (SET ANSINULL ON). -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) T

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Scott Whitney
wanted. :) -Original Message- From: Joshua D. Drake [mailto:j...@commandprompt.com] Sent: Wednesday, January 28, 2009 12:47 PM To: Scott Whitney Cc: 'Hoover, Jeffrey'; 'Kevin Grittner'; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Strange query problem... On Wed, 2009

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Joshua D. Drake
a2; > 2|two > 4|four > 0| > > sqlite> select * from a1 where i not in (select i from a2); > one > three > five > sqlite> > > -Original Message- > From: Scott Whitney [mailto:swhit...@journyx.com] > Sent: Wednesday, January 28, 2009 1:22 PM

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Scott Whitney
day, January 28, 2009 12:31 PM To: Scott Whitney; Kevin Grittner; pgsql-admin@postgresql.org Subject: RE: [ADMIN] Strange query problem... How do other databases handle this? I tried it in SQLite and I get different behavior (see below). Can someone try it in Oracle? In MySQL? In Sybase

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Scott Whitney
So, you're sayin' I ain't crazy? :) -Original Message- From: Hoover, Jeffrey [mailto:jhoo...@jcvi.org] Sent: Wednesday, January 28, 2009 12:18 PM To: Kevin Grittner; Scott Whitney; pgsql-admin@postgresql.org Subject: RE: [ADMIN] Strange query problem... Wow! I would neve

Re: [ADMIN] Strange query problem...

2009-01-28 Thread Kevin Grittner
>>> "Scott Whitney" wrote: > Um. How is this possible? > mydb=# select * from time_recs where id_time_rec not in (select > id_time_rec from punch_time_recs); > (0 rows) >Table "public.punch_time_recs" > Column | Type | Modifier