BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE
Дата
Msg-id 17579-82482cd7b267b862@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17579
Logged by:          Alexey Borzov
Email address:      borz_off@cs.msu.su
PostgreSQL version: Unsupported/Unknown
Operating system:   Windows
Description:

create table foo (id int);

with cte_failure as (
    merge into foo as target
    using foo as source
    on target.id = source.id
    when matched then do nothing
)
select 'fail!';

When executing the above code I get the following error:

> ERROR:  DO INSTEAD NOTIFY rules are not supported for data-modifying
statements in WITH

I suspect that MERGE was never intended to work as a CTE, but right now the
grammar allows any PreparableStmt in a common_table_expr and the above error
is triggered a lot later due to implementation details.


В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17578: undetected (on one side) deadlock with reindex CONCURRENTLY partitioned index vs drop index
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: BUG #17577: pg_ctl promote is not preemptive in archive recovery