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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Jones <rich(at)annexia(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Parse a statement, get parameter types and return types
Date: 2005-07-18 13:58:44
Message-ID: 2839.1121695124@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Richard Jones <rich(at)annexia(dot)org> writes:
> Given a statement, eg:
>   select foo from bar where col = $1

> I'd really like to get the types deduced by the PostgreSQL parser for
> the input variables ($1, etc.) and the result column(s).

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 :-(

			regards, tom lane

In response to

Responses

pgsql-interfaces by date

Next:From: Richard JonesDate: 2005-07-18 17:01:14
Subject: Re: Parse a statement, get parameter types and return types
Previous:From: Zahid KhanDate: 2005-07-18 13:13:52
Subject: info required about Dot net DataProvider

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