From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Joe Conway <mail@joeconway.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: ODBC does not handle WITH clause
Date: Thu, 23 May 2013 22:15:27 +0900
Message-ID: <519E166F.7020905@tpf.co.jp> (raw)
In-Reply-To: <519BF4F6.9020200@joeconway.com>
References: <519BF4F6.9020200@joeconway.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hi Jack,
(2013/05/22 7:28), Joe Conway wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> It seems the ODBC driver does not deal well with a WITH clause in a
> statement:
>
> 8<----------------------------------
> SQL> select id from generate_series(1,2) as t(id)
> +------------+
> | id |
> +------------+
> | 1 |
> | 2 |
> +------------+
> SQLRowCount returns -1
> 2 rows fetched
.
.
> SQL> with w as (select id from generate_series(1,2) as t(id)) select
> w.id from w
> SQLRowCount returns 0
> SQL> select id from generate_series(1,2) as t(id)
> [ISQL]ERROR: Could not SQLExecute
Thanks for the report.
> 8<----------------------------------
>
> The last statement fails (according to the logs) because:
> ERROR: cursor "SQL_CUR0x17c4bd0" already exists
>
> At that point the only recovery is ABORT.
>
> 8<----------------------------------
>
> This is with the latest odbc package on Linux Mint 14, but I have seen
> it on a client machine based on current Red Hat as well. Is this a
> known issue?
AFAIK no.
Psqlodbc drivers take care of with clause just a little.
As for the ERROR message, possibly I found at least one of the cause.
Could you test the change when I make a patch?
regards,
Hiroshi INoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, mail@joeconway.com
Subject: Re: ODBC does not handle WITH clause
In-Reply-To: <519E166F.7020905@tpf.co.jp>
References: <519BF4F6.9020200@joeconway.com> <519E166F.7020905@tpf.co.jp>
* 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