![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have two tables, let's say A and B. B is a child of a in one to many relationship. A contains records that are not referenced by B. I am running a query: select * from A t1 where t1.id not in (select t2.A_id from B t2); It returns 0 rows. Now I run (select t1.id from A t1) except (select t2.A_id from B t2); And now Postgres correctly returns records from A that are not referenced by B. Thanks a lot for your consideration of this bug. |
#3
| |||
| |||
|
|
I am running a query: select * from A t1 where t1.id not in (select t2.A_id from B t2); It returns 0 rows. Now I run (select t1.id from A t1) except (select t2.A_id from B t2); And now Postgres correctly returns records from A that are not referenced by B. |
#4
| |||
| |||
|
|
I tested this exampe. It works fine in Solaris platform (postgres 8.1.2 released recently by sun) Try the same example in some other version. If this is true, the changes need to be done for a particular version of postgres.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |