Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Adrian Klaver
On 5/13/20 11:16 AM, Matthias Apitz wrote: El día Mittwoch, Mai 13, 2020 a las 08:15:40 -0700, Adrian Klaver escribió: In your original post you had: "We're facing in our ESQL/C written application a situation where a commit'ed INSERT into a table is rolled back. I have here the ESQL/C logging

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Matthias Apitz
El día Mittwoch, Mai 13, 2020 a las 08:15:40 -0700, Adrian Klaver escribió: > In your original post you had: > > "We're facing in our ESQL/C written application a situation where a > commit'ed INSERT into a table is rolled back. I have here the ESQL/C > logging of the problem:" > ... > > "The IN

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Adrian Klaver
On 5/12/20 10:34 PM, Matthias Apitz wrote: El día Dienstag, Mai 12, 2020 a las 05:17:33 -0700, Adrian Klaver escribió: insert into swd_auftrag .. COMMIT? This question (if it was a question) I don't understand. From your original message: "The INSERT of 1 row into table swd_daten was OK

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Tom Lane
Matthias Apitz writes: > El día Dienstag, Mai 12, 2020 a las 08:01:15 -0400, Tom Lane escribió: >> Not an unreasonable suggestion, but it'd be more likely to happen if >> you send in a patch ;-). > as the first argument to ECPGdo() is of type int we can not do a hack > like "__LINE__:"__FILE__ (i

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Ravi Krishna
the pgm does an INSERT, after this the row is there and can be seen with SELECT; than I CLOSE a non existing cursor, which rolls back the INSERTed data: I have not done coding in ESQL/C in a long time, but shouldn't that be expected as any error should trigger a rollback.

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-13 Thread Matthias Apitz
I finally can reproduce the issue with a small ESQL/C written program for that purpose. I could attach here the source, but even seeing its printouts, all is perhaps clear: the pgm does an INSERT, after this the row is there and can be seen with SELECT; than I CLOSE a non existing cursor, which

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Matthias Apitz
El día Dienstag, Mai 12, 2020 a las 05:17:33 -0700, Adrian Klaver escribió: > > > insert into swd_auftrag .. > > > > > > COMMIT? > > > > This question (if it was a question) I don't understand. > > From your original message: > > "The INSERT of 1 row into table swd_daten was OK and commit'ed (

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Matthias Apitz
El día Dienstag, Mai 12, 2020 a las 08:01:15 -0400, Tom Lane escribió: > Matthias Apitz writes: > > And in the log the line logged is: > > [1471] [12.05.2020 15:48:50:476]: ecpg_process_output on line 1744: OK: > > INSERT 0 1 > > What I wanted to have is: > > [1471] [12.05.2020 15:48:50:476]: ec

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Adrian Klaver
On 5/12/20 4:52 PM, Matthias Apitz wrote: El día Dienstag, Mai 12, 2020 a las 12:30:17 -0700, Adrian Klaver escribió: On 5/12/20 12:14 PM, Matthias Apitz wrote: To answer also the question of Adrian Klaver: The database in question has ~400 tables and the ESQL/C application has for each tabl

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Tom Lane
Matthias Apitz writes: > And in the log the line logged is: > [1471] [12.05.2020 15:48:50:476]: ecpg_process_output on line 1744: OK: > INSERT 0 1 > What I wanted to have is: > [1471] [12.05.2020 15:48:50:476]: ecpg_process_output on line 1744 of > swd_daten.pgc: OK: INSERT 0 1 > i.e. have added

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Matthias Apitz
El día Dienstag, Mai 12, 2020 a las 12:30:17 -0700, Adrian Klaver escribió: > On 5/12/20 12:14 PM, Matthias Apitz wrote: > > > > To answer also the question of Adrian Klaver: > > > > The database in question has ~400 tables and the ESQL/C application has > > for each table its own ESQL/C source

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Adrian Klaver
On 5/12/20 12:14 PM, Matthias Apitz wrote: To answer also the question of Adrian Klaver: The database in question has ~400 tables and the ESQL/C application has for each table its own ESQL/C source file. It would be possible but a nightmare to share the code and it's better to discuss the probl

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Matthias Apitz
To answer also the question of Adrian Klaver: The database in question has ~400 tables and the ESQL/C application has for each table its own ESQL/C source file. It would be possible but a nightmare to share the code and it's better to discuss the problem based on the ESQL/c log file or I have to

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Tom Lane
Matthias Apitz writes: > We're facing in our ESQL/C written application a situation where a > commit'ed INSERT into a table is rolled back. Kind of hard to believe ... is there any sign of distress in the postmaster log? > I have here the ESQL/C > logging of the problem: > ... > [1471] [12.05.2

Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Adrian Klaver
On 5/12/20 7:53 AM, Matthias Apitz wrote: Hello, We're facing in our ESQL/C written application a situation where a commit'ed INSERT into a table is rolled back. I have here the ESQL/C logging of the problem: ... [1471] [12.05.2020 15:48:50:476]: ecpg_execute on line 1744: query: insert into

ESQL/C: a ROLLBACK rolls back a COMMITED transaction

2020-05-12 Thread Matthias Apitz
Hello, We're facing in our ESQL/C written application a situation where a commit'ed INSERT into a table is rolled back. I have here the ESQL/C logging of the problem: ... [1471] [12.05.2020 15:48:50:476]: ecpg_execute on line 1744: query: insert into swd_daten ( katkey , aktion , reserv , id ,