From: Michael Meskes <meskes@postgresql.org>
To: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Questions about pq library and ecpg
Date: Sat, 10 Apr 1999 12:01:04 +0200
Message-ID: <19990410120104.E2048@gmx.net> (raw)
In-Reply-To: <l0311070bb32405f4ef56@[147.233.148.142]>
References: <99032716072200.01169@zeman>
<l0311070bb32405f4ef56@[147.233.148.142]>
On Sun, Mar 28, 1999 at 06:37:28PM +0200, Herouth Maoz wrote:
> It can easily be done with libpq, though. Instead of what you wrote above,
> you simply have to build the query correctly:
>
> strcpy( str, 'table_name' );
>
> sprintf( query, "INSERT INTO %s VALUES ('%s', %d)", str, "Rome", 10 );
>
> result = PQexec( conn, query );
Which is essantially the same as
exec sql execute immediate :query;
:-)
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
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-interfaces@postgresql.org
Cc: meskes@postgresql.org
Subject: Re: [INTERFACES] Questions about pq library and ecpg
In-Reply-To: <19990410120104.E2048@gmx.net>
* 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