From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Jones <rich@annexia.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Parse a statement, get parameter types and return types
Date: Mon, 18 Jul 2005 09:58:44 -0400
Message-ID: <2839.1121695124@sss.pgh.pa.us> (raw)
In-Reply-To: <20050718130337.GA23201@furbychan.cocan.org>
References: <20050718130337.GA23201@furbychan.cocan.org>
Richard Jones <rich@annexia.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
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, rich@annexia.org
Subject: Re: Parse a statement, get parameter types and return types
In-Reply-To: <2839.1121695124@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