Stored Proc Problem - Mailing list pgsql-general

From Robert Landrum
Subject Stored Proc Problem
Date
Msg-id 46AE530B.1070000@aol.net
Whole thread Raw
Responses Re: Stored Proc Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-general by date:

Previous
From: Geoffrey
Date:
Subject: plperl syntax highlighting for vi
Next
From: Ralph Smith
Date:
Subject: Auto Starting +/or Shutdown on OS X