Re: [GENERAL] Dynamic DDL

2007-04-17 Thread Ketema
On Apr 17, 11:19 am, Ketema <[EMAIL PROTECTED]> wrote: > On Apr 17, 7:35 am, Ketema <[EMAIL PROTECTED]> wrote: > > > > > On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > > > > "Ketema" <[EMAIL PROTECTED]> writes: > > > > I have an example were I have to build a string in the below manner:

Re: [GENERAL] Dynamic DDL

2007-04-17 Thread Ketema
On Apr 17, 7:35 am, Ketema <[EMAIL PROTECTED]> wrote: > On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > > > > > "Ketema" <[EMAIL PROTECTED]> writes: > > > I have an example were I have to build a string in the below manner: > > > values (' || new.tpv_success_id || ',''' || new.order_date

Re: [GENERAL] Dynamic DDL

2007-04-17 Thread Ketema
On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > "Ketema" <[EMAIL PROTECTED]> writes: > > I have an example were I have to build a string in the below manner: > > values (' || new.tpv_success_id || ',''' || new.order_date || ''',' || > > new.tpv_id || ',' || new.ver_code || ',''' || new.ag

Re: [GENERAL] Dynamic DDL

2007-04-16 Thread Tom Lane
"Ketema" <[EMAIL PROTECTED]> writes: > I have an example were I have to build a string in the below manner: > values (' || new.tpv_success_id || ',''' || new.order_date || ''',' || > new.tpv_id || ',' || new.ver_code || ',''' || new.agent_name || ''',' > || new.agent_id || ',' > || n

Re: [GENERAL] Dynamic DDL

2007-04-16 Thread Ketema
On Apr 16, 4:47 pm, [EMAIL PROTECTED] (Martijn van Oosterhout) wrote: > On Mon, Apr 16, 2007 at 01:37:43PM -0700, Ketema wrote: > > create or replace function schema.insert_function(_schema text, _table > > text) returns integer > > > > >set search_path to _schema; > >insert into _table (c

Re: [GENERAL] Dynamic DDL

2007-04-16 Thread Martijn van Oosterhout
On Mon, Apr 16, 2007 at 01:37:43PM -0700, Ketema wrote: > create or replace function schema.insert_function(_schema text, _table > text) returns integer > set search_path to _schema; > insert into _table (columns) values(vals); > is there any whay to get the functionality of above

[GENERAL] Dynamic DDL

2007-04-16 Thread Ketema
create or replace function schema.insert_function(_schema text, _table text) returns integer as $BODY$ declare _affected integer; begin set search_path to _schema; insert into _table (columns) values(vals); return 0; end; $BODY$ language plpgsql; is there any whay to get th