Re: Column info without executing query - Mailing list pgsql-general

From Tom Lane
Subject Re: Column info without executing query
Date
Msg-id 10172.1153433815@sss.pgh.pa.us
Whole thread Raw
In response to Column info without executing query  (Dan Strömberg <dan.stromberg@stockholm.bonet.se>)
List pgsql-general
=?ISO-8859-1?Q?Dan_Str=F6mberg?= <dan.stromberg@stockholm.bonet.se> writes:
> I would like to know if it is possible to find out the datatypes in the
> resultset of a query or a set returning
> function without actually executing them ?

You could always do "SELECT ...whatever ... LIMIT 0".  Also, at the
protocol level there's Parse/Describe Statement, but whatever client
library you're using may not expose that usefully (I don't think libpq
does for instance).

            regards, tom lane

pgsql-general by date:

Previous
From: Claire McLister
Date:
Subject: Re: Create index hanging
Next
From: Tom Lane
Date:
Subject: Re: Create index hanging