Re: Column info without executing query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Strömberg <dan(dot)stromberg(at)stockholm(dot)bonet(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Column info without executing query
Date: 2006-07-20 22:16:55
Message-ID: 10172.1153433815@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?ISO-8859-1?Q?Dan_Str=F6mberg?= <dan(dot)stromberg(at)stockholm(dot)bonet(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2006-07-20 23:05:12 Re: calling stored procedure using ECPG
Previous Message Tom Lane 2006-07-20 22:13:37 Re: Create index hanging