oguimbal / pg-mem

An in memory postgres DB instance for your unit tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Error: πŸ”¨ Not supported πŸ”¨ : lookups on joins" thrown when "true and" added to lookup

rswheeldon opened this issue Β· comments

Describe the bug

I have a query with a join and some boolean logic. with an in(). Somehow this is tripping up an edge case in pg-mem. I've produced a simplified example which demonstrates it in the sandbox
(Describe your issue here).

πŸ”¨ Not supported πŸ”¨ : lookups on joins

πŸ‘‰ pg-mem is work-in-progress, and it would seem that you've hit one of its limits.

*️⃣ Reconsituted failed SQL statement: SELECT *  FROM foo  INNER JOIN bar  ON (foo .x = bar .x)  WHERE ((true) AND ((foo .x IN (1)) AND (true)))

πŸ‘‰ You can file an issue at https://github.com/oguimbal/pg-mem along with a way to reproduce this error (if you can), and  the stacktrace:

To Reproduce

create table foo (x integer);
create table bar (x integer);
insert into foo values (1), (2);
insert into bar values (1), (2);
select * from foo join bar using (x);
select * from foo join bar on foo.x = bar.x where ( foo.x in (1) and true ) ;
select * from foo join bar on foo.x = bar.x where true and ( foo.x in (1) and true ) ;

Note that the first two selects work fine but the third which should be practically identical in output doesn't.

pg-mem version

2.8.1