Re: declare column update expression

From: "Chris Velevitch" <chris(dot)velevitch(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: declare column update expression
Date: 2008-09-12 03:06:22
Message-ID: b0a3bf780809112006l5c3a8941y52ce1aa8623d9bda@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 12, 2008 at 12:50 PM, Artacus <artacus(at)comcast(dot)net> wrote:
> You can do this without triggers (at least on 8.3).
>
> UPDATE foo
> SET field1 = 2,
> field2 = default
> WHERE field3 = 22

That means I have to then go through all my code and make sure I set
the fields value. If I forget to modify one statement, things will
break. That's why I'm looking for a declarative way of doing and let
database handle it like it handles setting the default value of a
column on insert.

Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
September meeting: It's Going To Be Brilliant
Date: Mon 29th September 6pm for 6:30 start
Details and RSVP on http://apugs2008september.eventbrite.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Velevitch 2008-09-12 03:10:41 Re: declare column update expression
Previous Message Artacus 2008-09-12 02:50:48 Re: declare column update expression