pg-mem
pg-mem copied to clipboard
Column reported as not existing when referenced in subselect
Describe the bug
I have a table with a column on it, that pg-mem refuses to realise exists in a subselect although it's perfectly happy to return the same column in the main statement.
column "f.x" does not exist
🐜 This seems to be an execution error, which means that your request syntax seems okay,
but the resulting statement cannot be executed → Probably not a pg-mem error.
*️⃣ Reconsituted failed SQL statement: SELECT x , (SELECT (count ((1)) ) FROM foo WHERE (x >= f .x) ) FROM foo AS f
To Reproduce
create table foo(x integer);
insert into foo values (3), (5);
select x, (select count(1) from foo where x >= f.x) from foo f;
pg-mem version
2.8.1 (and current sand box at time of writing)