Search Postgresql Archives

Re: Query should have failed, but didn't?

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

 



This is not a bug; given your test queries whenever you reference ?id1? you
are ALWAYS referencing the column ?id1? in table ?test2?.

>>test=# select * from test2 where id1 in (select id1 from test1) and
charge=70;
>> id1 | charge 
>>-----+--------
>>  10 |     70
>> (1 row)

Hint: Consider the results of:

SELECT ?literal? FROM table1;

AND

SELECT
t1.*,
(SELECT t2.col2 FROM t2 WHERE t2.id = t1.id)
FROM t1;

David J.



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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