Thread: trigger column update

trigger column update

From
"Bolden, Thomas"
Date:
I am porting over a trigger from oracle.

"CREATE  TRIGGER TR_CLUSCODE_UPD AFTER UPDATE OF STFIPS, CLUSCODE,
CLUSTITLE, CLUSDESC ON CLUSCODE
FOR EACH ROW EXECUTE"

The trigger is column dependent and according to the online docs.
"


The CREATE TRIGGER statement in PostgreSQL implements a subset of the SQL99
standard. The following functionality is missing:


*
SQL99 allows triggers to fire on updates to specific columns (e.g., AFTER
UPDATE OF col1, col2).

"
anyone know a work around.


Thomas Bolden
Department of Economic Development
GIS Programmer
(573) 751-3672
tbolden@ded.state.mo.us




Re: trigger column update

From
frbn
Date:
Bolden, Thomas a écrit:
> I am porting over a trigger from oracle.
>
> "CREATE  TRIGGER TR_CLUSCODE_UPD AFTER UPDATE OF STFIPS, CLUSCODE,
> CLUSTITLE, CLUSDESC ON CLUSCODE
> FOR EACH ROW EXECUTE"
>
> The trigger is column dependent and according to the online docs.
> "
>
>
> The CREATE TRIGGER statement in PostgreSQL implements a subset of the SQL99
> standard. The following functionality is missing:
>
>
> *
> SQL99 allows triggers to fire on updates to specific columns (e.g., AFTER
> UPDATE OF col1, col2).
>
> "
> anyone know a work around.

you can put the columns you want to "trigger" in another table
and put a trigger on the update of this table.