Varchar computed column without explicit type does not populate RDB$CHARACTER_LENGTH ------------------------------------------------------------------------------------
Key: CORE-5862 URL: http://tracker.firebirdsql.org/browse/CORE-5862 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.3, 2.5.8, 4.0 Alpha 1 Environment: Firebird-4.0.0.1040-0_x64 Windows Reporter: Mark Rotteveel When defining a computed column with an explicit type, the RDB$FIELDS.RDB$CHARACTER_LENGTH is populated. Doing the same without an explicit length leaves this column NULL. Reproduction (using default character set UTF8): CREATE TABLE TEST_COLUMN_METADATA ( col_varchar_default_user VARCHAR(100) DEFAULT USER, col_varchar_default_literal VARCHAR(100) DEFAULT 'literal', col_varchar_generated_explicit VARCHAR(201) COMPUTED BY (col_varchar_default_user || ' ' || col_varchar_default_literal), col_varchar_generated_implicit COMPUTED BY (col_varchar_default_user || ' ' || col_varchar_default_literal) ) col_varchar_generated_explicit will have RDB$FIELDS.RDB$FIELD_LENGTH = 804 RDB$FIELDS.RDB$FIELD_TYPE = 37 RDB$CHARACTER_LENGTH = 201 RDB$CHARACTER_SET_ID = 4 col_varchar_generated_implicit however has: RDB$FIELDS.RDB$FIELD_LENGTH = 804 RDB$FIELDS.RDB$FIELD_TYPE = 37 RDB$CHARACTER_LENGTH = NULL (0 in 2.5.8) RDB$CHARACTER_SET_ID = 4 Based on the information available, Firebird should populated RDB$CHARACTER_LENGTH with 201 for the implicit type as well. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel