Re: Multitable insert syntax support on Postgres?

2022-11-20 Thread Corey Huinker
> > WITH data_src AS (SELECT * FROM source_tbl), > insert_a AS (INSERT INTO a SELECT * FROM data_src WHERE d < 5), > insert_b AS (INSERT INTO b SELECT * FROM data_src WHERE d >= 5) > INSERT INTO c SELECT * FROM data_src WHERE d < 5 > I suppose you could just do a dummy SELECT at the bottom to

Re: Multitable insert syntax support on Postgres?

2022-11-20 Thread Corey Huinker
On Mon, Nov 14, 2022 at 7:06 PM Alexandre hadjinlian guerra < alexhgue...@gmail.com> wrote: > Hello > Are there any plans to incorporate a formal syntax multitable/conditional > insert , similar to the syntax below? snowflake does have the same feature > >

Re: Multitable insert syntax support on Postgres?

2022-11-14 Thread Andres Freund
Hi, On 2022-11-14 21:06:09 -0300, Alexandre hadjinlian guerra wrote: > Hello > Are there any plans to incorporate a formal syntax multitable/conditional > insert , similar to the syntax below? snowflake does have the same feature > > https://oracle-base.com/articles/9i/multitable-inserts > >

Multitable insert syntax support on Postgres?

2022-11-14 Thread Alexandre hadjinlian guerra
Hello Are there any plans to incorporate a formal syntax multitable/conditional insert , similar to the syntax below? snowflake does have the same feature https://oracle-base.com/articles/9i/multitable-inserts Today, im resorting to a function that receives the necessary parameters from the