how referencing %rowtype variables without column names

From: lingyu(dot)tseng(at)gmail(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: how referencing %rowtype variables without column names
Date: 2006-05-16 04:05:20
Message-ID: 1147752320.462523.254730@j33g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"

Browse pgsql-sql by date

  From Date Subject
Next Message Jose Apablaza 2006-05-16 08:45:05 Re: MySQL DB to PostgresSQL DB
Previous Message Tom Lane 2006-05-16 00:08:05 Re: Find min and max values across two columns?