Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Stored Proc Problem



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group