Re: pgsql: Add support for MERGE SQL command

2022-09-20 Thread Alvaro Herrera
On 2022-Sep-19, Tom Lane wrote: > I wrote: > > It might be better to change these to temp tables. You'd then > > have to filter the temp schema out of the results; but since you > > have a filtering function anyway, that doesn't seem too hard. > > Or even easier, ALTER TABLE SET autovacuum_enabl

Re: pgsql: Add support for MERGE SQL command

2022-09-19 Thread Tom Lane
I wrote: > It might be better to change these to temp tables. You'd then > have to filter the temp schema out of the results; but since you > have a filtering function anyway, that doesn't seem too hard. Or even easier, ALTER TABLE SET autovacuum_enabled = 'false' before populating them.

Re: pgsql: Add support for MERGE SQL command

2022-09-19 Thread Tom Lane
Alvaro Herrera writes: > Add support for MERGE SQL command komodoensis just failed in a way that demonstrates instability of the MERGE tests [1]. It looks to me like a background autovacuum came along and processed one or both of ex_msource and ex_mtarget, causing their default join plan to chan

pgsql: Add support for MERGE SQL command

2022-03-28 Thread Alvaro Herrera
Add support for MERGE SQL command MERGE performs actions that modify rows in the target table using a source table or query. MERGE provides a single SQL statement that can conditionally INSERT/UPDATE/DELETE rows -- a task that would otherwise require multiple PL statements. For example, MERGE IN