Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Benedict Holland
This went on too long. On conflict is the solution. It has been since at least 9. I have run that in a production stored proc without a single problem. This is an actual and literal solution. Thanks, Ben On Sat, Apr 8, 2023, 5:51 PM Adrian Klaver wrote: > On 4/6/23 17:49, Louis Tian wrote: > >

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Adrian Klaver
On 4/6/23 17:49, Louis Tian wrote: Hi Peter, Thanks for your reply. Appreciate the help and discussion.  In general UPSERT (or any definition of it that I can think of) does not imply idempotency. "Idempotence is the property of certain operations in mathematics and computer science whereb

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Israel Brewster
> On Apr 6, 2023, at 4:49 PM, Louis Tian wrote: > > Hi Peter, > > Thanks for your reply. Appreciate the help and discussion. > >> In general UPSERT (or any definition of it that I can think of) does >> not imply idempotency. > > "Idempotence is the property of certain operations in mathematic

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Louis Tian
Hi Adrian, Thank you. I think this is a better approach than trigger-based solution, at least for my taste. That being said, it does require some logic to push to the client side (figuring out which required column value is missing and set it value to the existing one via reference of the table

Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-08 Thread Louis Tian
Hi Peter, Thanks for your reply. Appreciate the help and discussion. > In general UPSERT (or any definition of it that I can think of) does > not imply idempotency. "Idempotence is the property of certain operations in mathematics and computer science whereby they can be applied multiple times

Re: doc sql-grant.html Synopsis error?

2023-04-08 Thread Adrian Klaver
On 4/8/23 06:07, Achilleas Mantzios wrote: Στις 8/4/23 15:58, ο/η jian he έγραψε: Hi. --work as intended. grant ALL PRIVILEGES on FUNCTION pg_catalog.pg_reload_conf() to test; grant ALL PRIVILEGES on FUNCTION pg_reload_conf() to test; -errors. it should be work, or I interpret the

Re: doc sql-grant.html Synopsis error?

2023-04-08 Thread Achilleas Mantzios
Στις 8/4/23 15:58, ο/η jian he έγραψε: Hi. --work as intended. grant ALL PRIVILEGES on FUNCTION pg_catalog.pg_reload_conf() to test; grant ALL PRIVILEGES on FUNCTION pg_reload_conf() to test; -errors. it should be work, or I interpret the doc the wrong way? GRANT ALL PRIVILEGES ON

doc sql-grant.html Synopsis error?

2023-04-08 Thread jian he
Hi. --work as intended. grant ALL PRIVILEGES on FUNCTION pg_catalog.pg_reload_conf() to test; grant ALL PRIVILEGES on FUNCTION pg_reload_conf() to test; -errors. it should be work, or I interpret the doc the wrong way? GRANT ALL PRIVILEGES ON FUNCTION pg_reload_conf() IN SCHEMA pg_cata