Re: was field updated

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: hendra kusuma <penguinroad(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: was field updated
Date: 2009-07-13 11:27:04
Message-ID: 4A5B1A08.2020206@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I don't get it,
> you mean even if the field contain some data, it would be set to null
> if your update statement do not update the field?
Exactly. In my example, I have a record that shows current status and
can be updated by multiple processes. The only thing that is relevant
when I look at it is the last update. If process 1 updates fields A, B
and C and process 2 only updates fields A and B, then I want to set C to
null so that when I look at the current status, I see what the last
status that was set is.
I also don't have the ability to change all the other processes, so that
they set fields that they are not using to null.

In MSSQL triggers there is an UPDATE function that tells you if this
column was set in the update statement. I am looking for similar
functionality.

Sim

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marek Lewczuk 2009-07-13 11:28:51 Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Previous Message Leif B. Kristensen 2009-07-13 11:16:12 Re: ubuntu packages for 8.4