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

From Karsten Hilbert
Subject Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?
Date
Msg-id 20170215145911.thuaqw5k4pppyrct@hermes.hilbert.loc
Whole thread Raw
In response to Re: [GENERAL] Missing feature - how to differentiate insert/update inplpgsql function?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List 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 by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: [GENERAL] Missing feature - how to differentiate insert/updatein plpgsql function?