| From: | Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> |
|---|---|
| To: | Joe Conway <mail(at)joeconway(dot)com> |
| Cc: | "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
| Subject: | Re: ODBC does not handle WITH clause |
| Date: | 2013-05-23 13:15:27 |
| Message-ID: | 519E166F.7020905@tpf.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hiroshi Inoue | 2013-05-23 13:20:07 | Re: Cursor for a positioned update: "cursor <name> does not exist" error |
| Previous Message | Dev Kumkar | 2013-05-23 07:14:31 | Re: [ODBC] ODBC constructs |