how referencing %rowtype variables without column names - Mailing list pgsql-sql

From lingyu.tseng@gmail.com
Subject how referencing %rowtype variables without column names
Date
Msg-id 1147752320.462523.254730@j33g2000cwa.googlegroups.com
Whole thread Raw
List pgsql-sql
I wrote a trigger and use %rowtype , the problue is I need to put the
column name in a variable

like
Declare
columnname  VARCHAR(20);
NOTIFYRULE NOTIFY_RULE%ROWTYPE
begin
columnname='TYPE' /* ONE OF NOTIFY_RULE column*/

SELECT * INTO NOTIFYRULE FROM NOTIFY_RULE WHERE STATUS=:OLD.STATUS;

end;

how can i use this columnname to get the column value form NOTIFYRULE
without use "NOTIFYRULE.TYPE"



pgsql-sql by date:

Previous
From: Jeff MacDonald
Date:
Subject: Re: [pgsql-www] MySQL DB to PostgresSQL DB
Next
From: "Risto Tamme"
Date:
Subject: table constraint + INSERT