pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgreSQL.org>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] parse bind execute
Date: Sun, 20 Jun 1999 11:23:19 +0200
Message-ID: <19990620112319.E2076@gmx.net> (raw)
In-Reply-To: <3.0.5.32.19990618162935.00931100@poptop.llnl.gov>
References: <3.0.5.32.19990618162935.00931100@poptop.llnl.gov>

On Fri, Jun 18, 1999 at 04:29:35PM -0700, Steven Bradley wrote:
> I'm writing C programs to access a PostegreSQL database usng the libppq
> interface.  I am new to Postgres, so please excuse me if my question is too
> basic.
> 
> I want to preparate (parse) and SQL insert statement and then in a loop,
> bind the input variables and execute.  Is this possible using libpq or any
> other Posgres interface from C?

It is possible via ecpg the embedded SQL preprocessor for C. But be aware
that the PREPARE statement is only simulated since the backend does not
support it. That means you can do what you saif, but in fact everytime you
issue your INSERT it is parsed by the backend yet again.

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!



view thread (4+ messages)

Message-ID: <19990620112319.E2076@gmx.net>
Permalink:  ../19990620112319.E2076@gmx.net/
Also on:    postgresql.org/message-id/19990620112319.E2076@gmx.net

 · 

reply

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] parse bind execute
  In-Reply-To: <19990620112319.E2076@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