From: | "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su> |
---|---|
To: | ocie(at)paracel(dot)com |
Cc: | "Meskes, Michael" <meskes(at)topsystem(dot)de>, Andreas(dot)Zeugswetter(at)telecom(dot)at, pgsql-hackers(at)hub(dot)org |
Subject: | Re: [HACKERS] Subselects and NOTs |
Date: | 1998-02-20 01:26:51 |
Message-ID: | 34ECDBDA.6CE06D82@sable.krasnoyarsk.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
ocie(at)paracel(dot)com wrote:
>
> Meskes, Michael wrote:
> >
> > Exactly the same with the latest Oracle7 version.
>
> I also get the same results with Sybasem, with one interesting
> exception. Sybase will not let me select * in a subquery! It gives
> me the following:
>
> The symbol '*' can only be used for a subquery select list when the subquery is
> introduced with EXISTS or NOT EXISTS.
It's funny... SyBases could check subquery' target list length...
Ok, thanks. Pg returns the same results for these queries. But I asked
Andreas to run other queries and they show that both Oracle & Informix
push NOT into subquery clause (and so, 'NOT x IN' is equal 'x NOT IN'),
Pg doesn't, currently.
Ocie, could you run this in SyBase:
create table a (a int, a1 char(8));
create table b (b int);
insert into a values (1, 'one');
insert into a values (NULL, 'null');
insert into b values (1);
insert into b values (NULL);
select * from a where a in (select * from b);
-- 1 row with a == 1 expected
select * from a where a not in (select * from b);
-- 0 row expected
select * from a where not a in (select * from b);
-- 0 row in Oracle & Informix, 1 row in Pg (with a == NULL), SyBase ???
select * from a where not (a in (select * from b));
-- the same. SyBase ???
Vadim
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-02-20 01:44:08 | Re: AW: [HACKERS] Solution to the pg_user passwd problem !?? (c) |
Previous Message | ocie | 1998-02-19 23:25:56 | Re: [HACKERS] Solution to the pg_user passwd problem !?? (c) |