Re: [HACKERS] Updating column on row update

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Subject: Re: [HACKERS] Updating column on row update
Date: 2009-11-24 19:46:55
Message-ID: 603c8f070911241146w2f8da5eas7373d4ec67365953@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Nov 24, 2009 at 2:07 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> If it did so, that would be outside the apparent meaning of the
>> command, which is to do nothing if an object of that name exists.
>> That's why we've gone with CREATE OR REPLACE instead.
>
> I think that "fail on existence of an object conflicting with given
> definition" is behavior which could be documented and rates fairly
> low on my astonishment scale.  (I can't speak for anyone else.)

I think CINE should create the object if it does not exist and
otherwise do nothing. It might be useful to have some kind of
consistency-checking behavior, but it would probably be more useful if
decoupled from CINE, and in any case, that's not what "CREATE IF NOT
EXISTS" means to me.

> I am skeptical that, in the absence of built-in support for checking
> the existing object against the supplied definition, people would
> generally go any further than Andrew's example.  When they did, I'm
> skeptical about how often they would get the details exactly right.

Bingo.

...Robert

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ing. Marcos Ortiz Valmaseda 2009-11-24 20:31:36 Re: [PERFORM] Strange performance degradation
Previous Message Tom Lane 2009-11-24 19:29:20 Re: [HACKERS] Updating column on row update

Browse pgsql-hackers by date

  From Date Subject
Next Message Tim Bunce 2009-11-24 20:53:36 Re: Initial refactoring of plperl.c - draft [PATCH]
Previous Message Tom Lane 2009-11-24 19:29:20 Re: [HACKERS] Updating column on row update