On 04/02/2015 09:59 PM, Scott Ribe wrote:
On Apr 2, 2015, at 10:14 PM, Adrian Klaver 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
On April 2, 2015, Scott Ribe wrote:
> On Apr 2, 2015, at 10:14 PM, Adrian Klaver 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
On Apr 2, 2015, at 10:14 PM, Adrian Klaver 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 foun
On Apr 2, 2015, at 10:10 PM, Tom Lane wrote:
>
> Not like that, for certain. It might work to use EXECUTE ... USING new.*
> or some variant of that.
Couldn't get a variant of that to work, but this did:
execute('insert into ' || tblnm || ' select $1.*') using new;
--
Scott Ribe
scott_r...@el
On 04/02/2015 08:30 PM, Scott Ribe wrote:
Easier to give an example than describe the question, any chance of making
something like this work?
You doing this in plpgsql trigger function I presume?
execute('insert into ' || tblname || ' values(new.*)');
So
http://www.postgresql.org/docs/
Scott Ribe writes:
> Easier to give an example than describe the question, any chance of making
> something like this work?
> execute('insert into ' || tblname || ' values(new.*)');
Not like that, for certain. It might work to use EXECUTE ... USING new.*
or some variant of that.
Easier to give an example than describe the question, any chance of making
something like this work?
execute('insert into ' || tblname || ' values(new.*)');
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice