> If you're trying to figure out what the join condition should be:
> you don't need one, because the single row from "cte c" is supposed
> to join to every row of the x/y join result. So you could just
> write "ON true". Or leave it off altogether by writing CROSS JOIN,
> or by using comma syntax, like
> ... FROM xtab x JOIN ytab y ON x.x_key = y.y_key, cte c
That worked a treat, thanks Tom! I was wandering (lonely as a cloud
perhaps?) along that route, but I just couldn't get it to work. Maybe
I just needed the input of someone like yourself to convince me that I
was, in fact, on the right track.
Thanks again and rgs,
Pól...
> regards, tom lane