Stored Proc Problem

From: Robert Landrum <rlandrum(at)aol(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Stored Proc Problem
Date: 2007-07-30 21:07:23
Message-ID: 46AE530B.1070000@aol.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm writing a stored procedure that will execute as a trigger.
Arguments being passed to the procedure are field names.

My goal is to convert those field names into the field values. However,
I've not been successful. I thought that the following should have worked.

EXECUTE ''field_val := NEW.''||tg_argv[1]||'';'';

Nor does

EXECUTE ''SELECT INTO field_val NEW.''||tg_argv[1]||'';'';

I've tried using open for execute too... No luck.

Is this possible in pure SQL?

Rob

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Smith 2007-07-30 21:14:12 Auto Starting +/or Shutdown on OS X
Previous Message Geoffrey 2007-07-30 20:44:36 plperl syntax highlighting for vi