Re: [INTERFACES] parse bind execute

From: Michael Meskes <meskes(at)postgreSQL(dot)org>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] parse bind execute
Date: 1999-06-20 09:23:19
Message-ID: 19990620112319.E2076@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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(dot)Meskes(at)gmx(dot)net | Use PostgreSQL!

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Herouth Maoz 1999-06-20 15:22:17 Re: [INTERFACES] NullPointerException in blobtest (JDBC)
Previous Message Tatsuo Ishii 1999-06-20 05:41:57 Re: [INTERFACES] NullPointerException in blobtest (JDBC)