postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: siga0984 (@siga0984) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #102: Statement using WITH and INSERT does not work when UseDeclareFetch=1
Date: Tue, 08 Apr 2025 18:07:14 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
I think this is the important slice ... ODBC tries do declare a cursor with the entire statement ...
```
2025-04-08 15:00:09.516 -03 [30972] DEPURAÇÃO: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0
2025-04-08 15:00:09.516 -03 [30972] COMANDO: BEGIN;declare "SQL_CUR000001FF38302570" cursor with hold for WITH TRB(CAMPO) AS ( SELECT CAMPO FROM ORIGEM ) INSERT INTO DESTINO(CAMPO) SELECT CAMPO FROM TRB;fetch 100 in "SQL_CUR000001FF38302570"
2025-04-08 15:00:09.516 -03 [30972] ERRO: erro de sintaxe em ou pr?imo a "INSERT" no caractere 110
2025-04-08 15:00:09.516 -03 [30972] COMANDO: BEGIN;declare "SQL_CUR000001FF38302570" cursor with hold for WITH TRB(CAMPO) AS ( SELECT CAMPO FROM ORIGEM ) INSERT INTO DESTINO(CAMPO) SELECT CAMPO FROM TRB;fetch 100 in "SQL_CUR000001FF38302570"
2025-04-08 15:00:09.524 -03 [26044] DEPURAÇÃO: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0
2025-04-08 15:00:09.524 -03 [26044] COMANDO: delete from top_param where param_session = 26044
2025-04-08 15:00:09.525 -03 [30972] DEPURAÇÃO: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0
2025-04-08 15:00:09.525 -03 [30972] COMANDO: delete from top_param where param_session = 30972
2025-04-08 15:00:09.526 -03 [26044] DEPURAÇÃO: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0 (used)
2025-04-08 15:00:09.526 -03 [26044] COMANDO: delete from top_param where param_session = 26044
```
view thread (11+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: github://postgresql-interfaces/psqlodbc
Cc: [email protected], [email protected]
Subject: Re: [postgresql-interfaces/psqlodbc] issue #102: Statement using WITH and INSERT does not work when UseDeclareFetch=1
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox