On Wed, May 4, 2022 at 8:53 AM Alexander Farber <alexander.farber@xxxxxxxxx> wrote:
JOIN cteWHERE c.gid = in_gidAND (c.uid = myself.uid OR NOT opponent.muted)ORDER BY c.CREATED ASC;ERROR: syntax error at or near "WHERE"LINE 67: WHERE c.gid = in_gid^And if I remove the "JOIN cte" line, then the error is:ERROR: missing FROM-clause entry for table "cte"LINE 64: ...elf.uid IN (g.player1, g.player2) AND myself.uid = cte.uid)
Try "CROSS JOIN cte" - that variant doesn't require a join condition.