Re: libpq and prepared statements progress for 8.0

From: Abhijit Menon-Sen <ams(at)wiw(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq and prepared statements progress for 8.0
Date: 2004-09-20 06:32:23
Message-ID: 20040920063223.GA5183@penne.toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

At 2004-09-20 02:16:50 -0400, gsstark(at)mit(dot)edu wrote:
>
> Personally I find it annoying that you can't call describe on a
> statement, only a portal, but that's the way it is now.

No, it isn't. Describe accepts both prepared statement and portal names.
In the former case, it returns ParameterDescription message as well as
the RowDescriptions it returns for the latter.

> resultFormat is just a single integer in the protocol. You don't get
> to specify different formats for different columns.

Yes, you do. Bind accepts 0 (use the default text format), 1 (use this
format for all results), or as many result format specifiers as there
are results.

> What's nRows? None of the existing PQexec* take an nRows parameter.

Execute can be told to return no more than n rows of results. If there
are more rows available, the server returns PortalSuspended and awaits
another Execute message. The default of 0 imposes no limit.

Please read protocol-flow.html and protocol-message-formats.html.

-- ams

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-09-20 07:34:02 Re: libpq and prepared statements progress for 8.0
Previous Message Greg Stark 2004-09-20 06:16:50 Re: libpq and prepared statements progress for 8.0

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2004-09-20 07:27:00 Translation updates for 7.4/8.0: postgres-ru
Previous Message Greg Stark 2004-09-20 06:16:50 Re: libpq and prepared statements progress for 8.0