Re: Updating column on row update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Thom Brown <thombrown(at)gmail(dot)com>, PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Updating column on row update
Date: 2009-11-22 23:51:17
Message-ID: 17135.1258933877@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Craig Ringer <craig(at)postnewspapers(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel 2009-11-23 00:08:42 How to link with postgresql in gcc?
Previous Message Thom Brown 2009-11-22 23:40:12 Re: Updating column on row update

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-11-23 00:03:00 Re: operator exclusion constraints
Previous Message Thom Brown 2009-11-22 23:40:12 Re: Updating column on row update