From: | Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr> |
---|---|
To: | Shachar Shemesh <psql(at)shemesh(dot)biz>, Hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL OLE DB development <oledb-dev(at)gborg(dot)postgresql(dot)org> |
Subject: | Re: Getting the results columns before execution |
Date: | 2004-01-19 14:48:16 |
Message-ID: | 200401191548.16865.darko.prenosil@finteh.hr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Monday 19 January 2004 15:13, Shachar Shemesh wrote:
> Hi all,
>
> From the OLE DB manual:
> > The consumer can also get information about the columns of the rowset
> > by calling IColumnsInfo::GetColumnInfo, which all providers must
> > support, or IColumnsRowset::GetColumnsRowset, which providers may
> > support, on the command.
> >
> > Before calling GetColumnInfo or GetColumnsRowset, the consumer must
> > set the command text and, if the provider supports command
> > preparation, prepare the command object.
>
> The problem - it appears there is no requirement to execute the command
> before asking about the rowset returned. Only setting the actual command
> and preparing it. This is a problem, as merely preparing a command is
> not enough to get the returned rows information.
>
> I'm wondering whether anyone on this list(s) have an idea how to solve
> this? I can start the command in a cursor, and not retrieve information
> until requested. I can also execute the command with "where 0" appended
> to it. Neither solutions seem very practical or good performance wise.
>
> Shachar
LIMIT 0 will do ?
I do it often when I need to know structure of the result without returning
any rows.
Regards !
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-19 15:13:26 | Re: Getting the results columns before execution |
Previous Message | Shachar Shemesh | 2004-01-19 14:13:33 | Getting the results columns before execution |