pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brijesh Shrivastav <Bshrivastav@esri.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Issue with PQdescribePortal to describe a select cursor
Date: Tue, 28 Aug 2007 13:29:55 -0400
Message-ID: <29464.1188322195@sss.pgh.pa.us> (raw)
In-Reply-To: <5774D66D5EC83645A99B3A905527BB7102933EE5@zipwire.esri.com>
References: <5774D66D5EC83645A99B3A905527BB7102933EE5@zipwire.esri.com>

"Brijesh Shrivastav" <Bshrivastav@esri.com> writes:
> Please see the test program below that creates a table and then
> queries it using DECLARE CURSOR statement.

Well, you only prepared the DECLARE CURSOR command, you didn't execute
it --- so there's no cursor, only a prepared statement sitting waiting
to be used.

Once you execute the DECLARE CURSOR, you should be able to describe its
portal in advance of fetching any rows from it.  Or is that not what
you wanted?

> ... (in many
> cases I need input bind parameter data from client application
> before executing the query).

I think you might be looking for Describe Statement (on a prepared
statement) rather than Describe Portal.  You have to have already
provided parameter values in order to have a portal at all...

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <29464.1188322195@sss.pgh.pa.us>
Permalink:  ../29464.1188322195@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29464.1188322195@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, Bshrivastav@esri.com
  Subject: Re: Issue with PQdescribePortal to describe a select cursor
  In-Reply-To: <29464.1188322195@sss.pgh.pa.us>

* 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