pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Jackson <mhjacks@nwa.quik.com>
To: pgsql-interfaces@postgresql.org
Subject: ESQL/C Docs:  Request for code
Date: Sat, 11 Dec 1999 14:25:10 -0600
Message-ID: <3852B326.D68C6BE2@nwa.quik.com> (raw)

Hello all,

I am looking for examples of working ECPG code.  Partly I would like to
see for myself how it works, but I would also be willing to write some
documentation on it, which I would be willing to submit to the CVS tree.

I do not understand, for example, how to handle cursors in ECPG because
I have not found any examples of doing so in the documentation I have. 
Others have probably had the same problem.

I am familiar with the Informix ESQL/C implementation, if that matters.

Would anyone be willing to email me some working code, along with the
appropriate table definitions?  It need not be too elaborate, but I
would like to know the following\ things:

1)  How do you set up a fetch operation?  Is there a nicer way to do it
in EC without a cursor?  That is,

	DECLARE foo CURSOR FOR
		SELECT * FROM bar
		WHERE baz = :bazval

	{time passes}

	FETCH foo INTO :bletch, :foo2;

2)  Can you PREPARE (i.e. cache) statements for later execution?
	EXEC SQL DELETE FROM foo
		WHERE baz = ?

3)  Does Postgres directly support placeholders (?)?  I've used them in
DBI, but I don't know whether that's some hack by the Postgres driver
author or if it's an actual Postgres feature?

4)  What kind of scope do declared cursors have?

5) (META-QUESTION):  Is ECPG suitable for a large system, i.e. an
accounting system for a small business?

-- 
====================================
Martin Jackson: mhjacks@nwa.quik.com
====================================
Are you running Linux yet?



view thread (3+ messages)  latest in thread

Message-ID: <3852B326.D68C6BE2@nwa.quik.com>
Permalink:  ../3852B326.D68C6BE2@nwa.quik.com/
Also on:    postgresql.org/message-id/3852B326.D68C6BE2@nwa.quik.com

 · 

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: mhjacks@nwa.quik.com
  Subject: Re: ESQL/C Docs:  Request for code
  In-Reply-To: <3852B326.D68C6BE2@nwa.quik.com>

* 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