Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B539F9FF8@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на [GENERAL] Missing feature - how to differentiate insert/update in plpgsqlfunction?  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
hubert depesz lubaczewski wrote:
> 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?

Maybe the following answer can help:
http://stackoverflow.com/a/39204667/6464308

I don't really know how stable that (undocumented) behaviour will be, though.

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?