Re: [GENERAL] Updating column on row update - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Updating column on row update
Date
Msg-id 17135.1258933877@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Updating column on row update  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: [GENERAL] Updating column on row update  (Robert Haas <robertmhaas@gmail.com>)
Re: [GENERAL] Updating column on row update  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
Craig Ringer <craig@postnewspapers.com.au> writes:
> I do think this comes up often enough that a built-in trigger "update
> named column with result of expression on insert" trigger might be
> desirable.

There's something of the sort in contrib already, I believe, though
it's so old it still uses abstime :-(

> So might "CREATE LANGUAGE ... IF NOT EXISTS". Maybe even "CREATE ROLE
> ... IF NOT EXISTS" and "CREATE USER ... IF NOT EXISTS" - I know I'd find
> them really handy.

CREATE IF NOT EXISTS has been proposed and rejected before, more than
once.  Please see the archives.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: [GENERAL] Updating column on row update
Next
From: David Fetter
Date:
Subject: Re: operator exclusion constraints