Re: Triggers: using table's primary key value to update another field - Mailing list pgsql-general

From Qingqing Zhou
Subject Re: Triggers: using table's primary key value to update another field
Date
Msg-id d2gvli$16f7$1@news.hub.org
Whole thread Raw
In response to Triggers: using table's primary key value to update another field  (Randall Perry <rgp@systame.com>)
List pgsql-general
"Randall Perry" <rgp@systame.com> writes
> What I'm having trouble with is figuring out how to grab the primary key
> value of the current row. I tried tacking on a var with the pkey row name
to
> NEW, but that doesn't work (didn't think it would).

There is an example in PG docs.

http://www.postgresql.org/docs/8.0/static/trigger-example.html

Regards,
Qingqing



pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: truncate/create slowness
Next
From: "Qingqing Zhou"
Date:
Subject: Re: Postgres Processing Help !!!!