Search Postgresql Archives

Stored Proc Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux