On Apr 2, 2015, at 10:14 PM, Adrian Klaver <[email protected]> wrote:
>
> EXECUTE 'insert into ' || quote_ident(tblname) || ' values(' || new.* || ')'
Not that easy, strings are not quoted correctly, and null values are blank.
Might be a function to translate new.* into a string as needed for this use,
but I found another way based on Tom's suggestion:
execute('insert into ' || tblnm || ' select $1.*') using new;
--
Scott Ribe
[email protected]
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general