Re: Merge command is erroring with: PlaceHolderVar found where not expected
От | Tom Lane |
---|---|
Тема | Re: Merge command is erroring with: PlaceHolderVar found where not expected |
Дата | |
Msg-id | 3204629.1678891701@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Merge command is erroring with: PlaceHolderVar found where not expected (Önder Kalacı <onderkalaci@gmail.com>) |
Список | pgsql-bugs |
=?UTF-8?B?w5ZuZGVyIEthbGFjxLE=?= <onderkalaci@gmail.com> writes: > CREATE TABLE source (id integer, z int); > CREATE TABLE target (id integer, z int); > MERGE INTO public.target sda USING ((SELECT source.id, source.z, 12 AS rnd > FROM public.source source) sdn FULL JOIN public.source sdn2 ON ((sdn.id > OPERATOR(pg_catalog.=) sdn2.id))) ON (sda.id OPERATOR(pg_catalog.=) sdn.id) > WHEN NOT MATCHED THEN INSERT (id, z) VALUES (sdn.id, sdn.rnd); > *ERROR: PlaceHolderVar found where not expected* Thanks for the report! Somebody was far too optimistic here: * Add resjunk entries for any Vars used in each action's * targetlist and WHEN condition that belong to relations other * than target. Note that aggregates, window functions and * placeholder vars are not possible anywhere in MERGE's WHEN * clauses. (PHVs may be added later, but they don't concern us * here.) I'm not sure offhand whether RECURSE or INCLUDE is the more appropriate action. regards, tom lane
В списке pgsql-bugs по дате отправления: