Thread: Re: libpq and prepared statements progress for 8.0

Re: libpq and prepared statements progress for 8.0

From
Abhijit Menon-Sen
Date:
At 2004-09-20 13:24:47 -0400, tgl@sss.pgh.pa.us wrote:
>
> It depends on whether you think that PQprepare should bundle the
> Describe Statement operation or not.

I decided against bundling the two operations together. Here's a patch
to add PQprepare() and PQsendPrepare() in a fairly self-contained way.
Also attached is a test program à la testlibpq3.c that I used to test
the change. This should be all that's needed for DBD::Pg to prepare a
statement without pre-specifying types.

(I'll post a separate patch for PQdescribe() later. It's a little more
involved, and I need to fix a couple of bugs I found during testing.)

Any thoughts? Does this look good enough for 8.0?

-- ams

Attachment

Re: [HACKERS] libpq and prepared statements progress for 8.0

From
Tom Lane
Date:
Abhijit Menon-Sen <ams@oryx.com> writes:
> I decided against bundling the two operations together. Here's a patch
> to add PQprepare() and PQsendPrepare() in a fairly self-contained way.
> Any thoughts? Does this look good enough for 8.0?

Seems OK as far as it goes, but a complete patch would require
documentation additions.  Also you missed adding entry points in the
.dll files, and possibly other minor things.  Searching for all
references to one of the existing entry points such as PQexecPrepared
will probably help you identify what you need to do.

            regards, tom lane

Re: libpq and prepared statements progress for 8.0

From
Abhijit Menon-Sen
Date:
At 2004-10-05 17:48:27 -0400, tgl@sss.pgh.pa.us wrote:
>
> Searching for all references to one of the existing entry points such
> as PQexecPrepared will probably help you identify what you need to do.

OK. I've attached two additional patches below.

I don't really understand how the *.def files work, so I'm just guessing
about what needs to be changed. Thanks to Josh Berkus and Kris Jurka for
looking over the documentation patch, which just adds descriptions of
the two new functions.

I apologise in advance if I've missed anything.

-- ams

Attachment