From: Dinesh Pandey <dpandey@secf.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'PostgreSQL' <pgsql-sql@postgresql.org>
Subject: Re: dynamic 'INSERT' query?
Date: Thu, 14 Apr 2005 20:27:46 +0530
Message-ID: <20050414150104.457BB53F8C@svr1.postgresql.org> (raw)
In-Reply-To: <564.1113490394@sss.pgh.pa.us>
Yes here the TABLE NAME is also coming at runtime.
Like In Oracle I have done in this way:
-------------------------------------------
LOOP
v_sql := 'INSERT INTO ' || mytable || ' VALUES(:in_sentryid_id,
:in_node_id)';
EXECUTE IMMEDIATE v_sql USING v_sentryid, v_nodeid;
END LOOP;
How to convert this into Postgres?????
Thanks
Dinesh Pandey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dpandey@secf.com, tgl@sss.pgh.pa.us
Subject: Re: dynamic 'INSERT' query?
In-Reply-To: <20050414150104.457BB53F8C@svr1.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox