Skip site navigation (1) Skip section navigation (2)

Re: Parse a statement, get parameter types and return types

From: Richard Jones <rich(at)annexia(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Parse a statement, get parameter types and return types
Date: 2005-07-18 17:01:14
Message-ID: 20050718170113.GA3411@furbychan.cocan.org (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Mon, Jul 18, 2005 at 09:58:44AM -0400, Tom Lane wrote:
> This is possible at the protocol level -- see Describe Statement.
> I'm not sure which client libraries let you get at the results ...
> libpq isn't one of them :-(

Thanks for answering my question so promptly!

I've made a small patch against 8.0.3 which adds this functionality to
libpq-fe.  However I am not very certain of how the asynchronous stuff
works in this library, so it will need careful checking.
Nevertheless, it Works For Me in the limited testing I have done
against a 7.4 server.

http://annexia.org/tmp/PQsendDescribeStatement.diff

Note the user is expected to free(3) the Oids (types) array returned
by PQgetDescription.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com

In response to

pgsql-interfaces by date

Next:From: Scott CainDate: 2005-07-18 17:06:26
Subject: DBD::PgSPI killing server connection
Previous:From: Tom LaneDate: 2005-07-18 13:58:44
Subject: Re: Parse a statement, get parameter types and return types

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group