Search Postgresql Archives

Strange behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

I’m surprised by this behavior I noticed in pgadmin3 and postgresql 9.6

 

Suppose those two tables

create table test1 (v1 text)

create table test2 (v2 text)

insert into test1 (v1) values ('A')

insert into test2 (v2) values ('B')

 

query select v1 from test2 return v2 column doesn’t exists. Right.

 

But the following query does not return any error but only an empty result set.

select v1 from test1 where v1 not in (select v1 from test2)

 

In other words, a wrong query returns a valid result. This happens because v1 is a column from test1, (select vx from test2) will return an error as expected.

 

Did I missed something ?

 

Thanks,

 

Olivier


Garanti sans virus. www.avast.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux