RE: ODBC: Declare/Fetch & SELECT INTO

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: ODBC: Declare/Fetch & SELECT INTO
Date: 2000-09-01 08:24:27
Message-ID: 8568FC767B4AD311AC33006097BCD3D6091946@woody.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 31 August 2000 21:47
> To: Dave Page
> Cc: 'pgsql-interfaces(at)postgresql(dot)org'
> Subject: Re: [INTERFACES] ODBC: Declare/Fetch & SELECT INTO
>
>
> Dave Page <dpage(at)vale-housing(dot)co(dot)uk> writes:
> > The following is from the commlog - the table is not
> created, and no error
> > is raised:
> > conn=52758652, query='declare SQL_CUR0325413C cursor for
> SELECT * INTO
> > pgadmin_desc FROM pg_description WHERE objoid > 18655'
>
> Hmm. I'd say that that should raise an error, since you are
> giving the
> backend conflicting instructions about where to deliver the selected
> tuples (through the cursor, or into a new table). I think right now
> the code simply ignores the INTO clause when the context is a cursor
> declaration, but giving an error if both are specified seems more
> appropriate.
>
> However, that might not help you very much :-(. I take it you are
> just issuing a SELECT INTO command yourself, and ODBC is tacking on
> the DECLARE CURSOR part? Seems ODBC needs to know not to do that
> for a SELECT INTO.

Yeah, that's exactly what I'm doing. My understanding was that that's what
the Declare/Fetch option does - ie. forces the use of server side cursors
for selects (but not 'select into' if all was well), presumably useful for
handling particuarly large resultsets.

One for someone familiar with the ODBC driver code methinks :-)

Regards,

Dave.

--
Disclaimer: the above is the author's personal opinion and is not the
opinion or policy of his employer or of the little green men that have been
following him all day.
http://www.vale-housing.co.uk/ - http://www.pgadmin.freeserve.co.uk/

Browse pgsql-interfaces by date

  From Date Subject
Next Message Zeljko Trogrlic 2000-09-04 12:22:39 JDBC isNullable is not working
Previous Message Bill 2000-09-01 00:06:56 SQLColumns not working (ODBC)