SELECT * FROM (SELECT 1 AS i) AS a WHERE NOT EXISTS (SELECT 1 WHERE 1 <> i);
TRAP: FailedAssertion("!(!bms_is_empty(min_righthand))", File: "initsplan.c", Line: 685)
Looks like it's assuming there's at least one relation on each side of the
join. Incidentally originally triggered with a VALUES clause but I think by
the point the code runs that distinction is long gone.
Ask me about EnterpriseDB's Slony Replication support!