On 02/15/2017 06:05 AM, hubert depesz lubaczewski wrote:
> 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?
All I can think of is to use:
RETURNING pk
and see if that changed or not.
>
> Best regards,
>
> depesz
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com