Re: [Firebird-devel] SQL in CHECK constraints - strange behaviour - can it be changed?

2021-05-05 Thread Pól Ua L . via Firebird-devel
Hi Mark, and thanks for getting back to me. Le mercredi, mai 5, 2021 5:35 PM, Mark Rotteveel a écrit  : > > Maybe if the DBA/dev could put the KEYWORD [BEFORE | ON |  AFTER] for > > SQL in CHECK constraints which contain SQL? > > If this is the wrong place to suggest this, please let me know w

Re: [Firebird-devel] SQL in CHECK constraints - strange behaviour - can it be changed?

2021-05-05 Thread Mark Rotteveel
On 05-05-2021 18:25, Pól Ua L. via Firebird-devel wrote: So, it appears that the CHECK constraint creates a TRIGGER that is a BEFORE INSERT one - I think (at least for this use case), it should be an ON INSERT or AFTER INSERT trigger so that the SUM(loan_amount) GROUP BY manager_name can never

[Firebird-devel] SQL in CHECK constraints - strange behaviour - can it be changed?

2021-05-05 Thread Pól Ua L . via Firebird-devel
Hi all, I did the following (all the code below is available here): https://dbfiddle.uk/?rdbms=firebird_3.0&fiddle=ddadd69f144fb3341fb4f710a645edac CREATE TABLE portfolio ( manager_name VARCHAR (25) NOT NULL, loan_amount INTEGER NOT NULL CHECK (loan_amount <= 100) ); populated it: INSERT INTO

Re: [Firebird-devel] Max number of table versions

2021-05-05 Thread Dmitry Yemanov
05.05.2021 16:55, Adriano dos Santos Fernandes wrote: As I understand, 255 limit for table version is due to record format number embeded in records. We had the same situation with 32-bit transaction numbers and it's now possible to have 64-bit transactions using rhd_long_tranum flag. Which l

Re: [Firebird-devel] Max number of table versions

2021-05-05 Thread Dimitry Sibiryakov
05.05.2021 15:55, Adriano dos Santos Fernandes wrote: Can we add a flag for long record format so we can increase table versions limit to 64K? Better would be to delete unused formats and reuse their numbers later. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.

[Firebird-devel] Max number of table versions

2021-05-05 Thread Adriano dos Santos Fernandes
Hi! As I understand, 255 limit for table version is due to record format number embeded in records. We had the same situation with 32-bit transaction numbers and it's now possible to have 64-bit transactions using rhd_long_tranum flag. Can we add a flag for long record format so we can increase