Re: [Firebird-devel] Problem with MERGE

2015-06-10 Thread Claudio Valderrama C.
> -Original Message- > From: Dmitry Yemanov [mailto:firebi...@yandex.ru] > Sent: Miércoles, 10 de Junio de 2015 15:40 > > > > With the old logic, the result is one. With the new logic, > the result is two > > becaise we get the direct and indirect effects. > > I doubt the new logic would

Re: [Firebird-devel] Problem with MERGE

2015-06-10 Thread Dmitry Yemanov
10.06.2015 23:28, Claudio Valderrama C. wrote: > > I would like to be able to know that I'm dealing with MERGE or any other > statement that can lead to an update and/or insert. Adding > inserts+updates+deletes is not a problem (indeed, it's simpler code), but > it's a departure of the traditional

Re: [Firebird-devel] Problem with MERGE

2015-06-10 Thread Dimitry Sibiryakov
10.06.2015 22:28, Claudio Valderrama C. wrote: > With the old logic, the result is one. With the new logic, the result is two > becaise we get the direct and indirect effects. Is it really the case? I never saw trigger's actions to be shown in result of isc_info_sql_records. Was I just lucky?

Re: [Firebird-devel] Problem with MERGE

2015-06-10 Thread Claudio Valderrama C.
> -Original Message- > From: Dmitry Yemanov [mailto:firebi...@yandex.ru] > Sent: Martes, 09 de Junio de 2015 6:19 > > 09.06.2015 13:11, Dimitry Sibiryakov wrote: > > > > ISQL would better always report "Rows affected" as a sum of > all three components of > > info response: inserts+upda

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Dmitry Yemanov
09.06.2015 15:23, Simonov Denis wrote: >> We could add a new info tag to return the internal ROWS_AFFECTED value, >> so that ISQL would not need to rely on separate I/U/D counters. > > Then also add context variables to obtain these counters Any good example why you would need them in PSQL? Dmi

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Simonov Denis
Dmitry Yemanov писал(а) в своём письме Tue, 09 Jun 2015 12:07:39 +0300: > 09.06.2015 07:13, Claudio Valderrama C. wrote: >> >> Ideas? > > We could add a new info tag to return the internal ROWS_AFFECTED value, > so that ISQL would not need to rely on separate I/U/D counters. > Then also add co

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Dmitry Yemanov
09.06.2015 13:11, Dimitry Sibiryakov wrote: > > ISQL would better always report "Rows affected" as a sum of all three > components of > info response: inserts+updates+deletes. Sounds as a good short-term solution. Does anyone see problems with this approach? Dmitry -

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Dimitry Sibiryakov
09.06.2015 11:02, Alex Peshkoff wrote: > May be not throw but slightly extend? In non-merge INSERT update count > should always be 0. Can we always take into an account non-zero update > count for insert-like-reported statements? ISQL would better always report "Rows affected" as a sum of all t

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Alex Peshkoff
On 06/09/2015 12:07 PM, Dmitry Yemanov wrote: > 09.06.2015 07:13, Claudio Valderrama C. wrote: >> Ideas? > We could add a new info tag to return the internal ROWS_AFFECTED value, > so that ISQL would not need to rely on separate I/U/D counters. > > Given that ISQL already uses the new API, maybe we

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Dmitry Yemanov
09.06.2015 07:13, Claudio Valderrama C. wrote: > > Ideas? We could add a new info tag to return the internal ROWS_AFFECTED value, so that ISQL would not need to rely on separate I/U/D counters. Given that ISQL already uses the new API, maybe we could even surface such an info request directly v

Re: [Firebird-devel] Problem with MERGE

2015-06-09 Thread Alex Peshkoff
On 06/09/2015 07:13 AM, Claudio Valderrama C. wrote: > Hello, I want to hear opinions on this: > > currently, MERGE is always reported as this value of statement type: > #define isc_info_sql_stmt_insert 2 > > It seems to be always an insert statement for the engine. So far so good. > Now,

[Firebird-devel] Problem with MERGE

2015-06-08 Thread Claudio Valderrama C.
Hello, I want to hear opinions on this: currently, MERGE is always reported as this value of statement type: #define isc_info_sql_stmt_insert 2 It seems to be always an insert statement for the engine. So far so good. Now, please look at isql's process_record_count(): because the input p