Re: Issue with PQdescribePortal to describe a select cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brijesh Shrivastav" <Bshrivastav(at)esri(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Issue with PQdescribePortal to describe a select cursor
Date: 2007-08-28 17:29:55
Message-ID: 29464.1188322195@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Brijesh Shrivastav" <Bshrivastav(at)esri(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Brijesh Shrivastav 2007-08-28 18:15:02 Re: Issue with PQdescribePortal to describe a select cursor
Previous Message Brijesh Shrivastav 2007-08-28 17:10:21 Re: Issue with PQdescribePortal to describe a select cursor