Re: ODBC does not handle WITH clause
От | Hiroshi Inoue |
---|---|
Тема | Re: ODBC does not handle WITH clause |
Дата | |
Msg-id | 519E166F.7020905@tpf.co.jp обсуждение исходный текст |
Ответ на | ODBC does not handle WITH clause (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: ODBC does not handle WITH clause
|
Список | 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
В списке pgsql-odbc по дате отправления: