New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent domain's constraint validation in PSQL [CORE3545] #3901
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Commented by: @pavel-zotov Following script and its output shows that when domain based on collation which was created with attrubite 'NUMERIC-SORT=1' than some values can be pass through limitation od domain definition:
=== STDOUT + STDERR in WI-T3.0.0.31844, starting from line 'show collation':
CO_NUMS, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, 'COLL-VERSION=58.0.6.50;NUMERIC-SORT=1'
ID INTEGER Nullable
Statement failed, SQLSTATE = 23000
Statement failed, SQLSTATE = 23000
ID 1 ID 2 ID 3 ID 3
Statement failed, SQLSTATE = 42000
Statement failed, SQLSTATE = 42000
|
Modified by: @pavel-zotovstatus: Reopened [ 4 ] => Reopened [ 4 ] QA Status: Done with caveats Test Details: TODO: re-implement after resolving issue related to 'NUMERIC-SORT=1' |
Modified by: @asfernandes |
Modified by: @asfernandesstatus: Reopened [ 4 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 RC 1 [ 10584 ] Fix Version: 3.0 Alpha 1 [ 10331 ] => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done with caveats => Done successfully Test Details: TODO: re-implement after resolving issue related to 'NUMERIC-SORT=1' => Tested OK 24.08.2015 ( checked block of statements after message http://sourceforge.net/p/firebird/code/62113 ) |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @asfernandes
Is related to QA567
Relate to CORE3947
The domain's check constraint validation is done using the type of the expression, instead of the type of the variable.
Test case:
create domain dx varchar(2) check (value < '5')!
-- No error: ok
execute block as
declare v1 dx = '40';
begin
end!
-- Error: not ok - validation error for variable V1, value "40"
execute block as
declare v1 dx = 40;
begin
end!
Commits: 046355b d8a30e8 FirebirdSQL/fbt-repository@09988b3
====== Test Details ======
Tested OK 24.08.2015 ( checked block of statements after message http://sourceforge.net/p/firebird/code/62113 )
The text was updated successfully, but these errors were encountered: