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

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?
Дата
Msg-id 20170215145911.thuaqw5k4pppyrct@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: [GENERAL] Missing feature - how to differentiate insert/update inplpgsql function?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Wed, Feb 15, 2017 at 06:44:09AM -0800, Adrian Klaver wrote:

> > Well, this wouldn't work for me as pkey will not change.
>
> Alright you lost me. If the pkey does not change then how do you get new
> rows(INSERT)?

I think OP is using natural (rather than surrogate) primary
keys. So, the PK already exists or else is created. But the
(then-returned) _value_ of either is the same.

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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

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