[GENERAL] Missing feature - how to differentiate insert/update in plpgsqlfunction? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject [GENERAL] Missing feature - how to differentiate insert/update in plpgsqlfunction?
Date
Msg-id 20170215140502.GA25364@depesz.com
Whole thread Raw
Responses Re: [GENERAL] Missing feature - how to differentiate insert/update inplpgsql function?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Hi,
I have a function, in PostgreSQL 9.6, which does:

INSERT INTO table () values (...)
ON CONFLICT DO UPDATE ...;

The thing is that the function should return information whether the row
was modified, or created - and currently it seems that this is not
available. Or am I missing something?

Best regards,

depesz



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: [GENERAL] Bad planning data resulting in OOM killing of postgres
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Missing feature - how to differentiate insert/update inplpgsql function?