On Sun, 28 Nov 2004, Shachar Shemesh wrote: > I need to create a list of all rows of the combination of two tables. > For reasons I can't go into, I need this list to be in a single query, > and not write a function to do it. > > I thought about doing something like this: > select |COALESCE(table1.field, table2.field) as field from table1 full > outer join table2 on false > > There is just one small problem. Even though logically this does what > I'm trying to do, postgres says: > "FULL JOIN is only supported with merge-joinable conditions". > > I don't even understand the error message, much less whether I'm doing > anything wrong, and whether I'm missing something stupifyingly obvious here.
We don't support join conditions like the above at this point. The message isn't terribly helpful though. Fortunately, I think some variant like select table1.field from table1 union all select table2.field from table2; will give you the output you're looking for. ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly