Collation id field is NULL

38 views
Skip to first unread message

Dimitry Sibiryakov

unread,
Oct 6, 2023, 6:02:23 AM10/6/23
to Firebird Developers List
Hello All,

is NULL in RDB$FIELDS.RDB$COLLATION_ID means "default collation" or "zero
collation"?
BTW, the values in this field is inconsistent for system domains. Some record
has NULL and some 0.

--
WBR, SD.

Adriano dos Santos Fernandes

unread,
Oct 6, 2023, 8:16:26 PM10/6/23
to firebir...@googlegroups.com
On 06/10/2023 07:02, 'Dimitry Sibiryakov' via firebird-devel wrote:
>   Hello All,
>
>   is NULL in RDB$FIELDS.RDB$COLLATION_ID means "default collation" or
> "zero collation"?

Since the system fields was never not-nullable, this are is sometime grey.

I would say, without look at any details, that a string field should not
have a NULL collate.

But you bringing this subj, may say what you found, how things becomes
problematic in the way it is, etc.


>   BTW, the values in this field is inconsistent for system domains. Some
> record has NULL and some 0.
>

Some? Some what/when?


Adriano

Dimitry Sibiryakov

unread,
Oct 7, 2023, 5:19:16 AM10/7/23
to firebir...@googlegroups.com
Adriano dos Santos Fernandes wrote 07.10.2023 2:16:
>>   BTW, the values in this field is inconsistent for system domains. Some
>> record has NULL and some 0.
>>
> Some? Some what/when?

Some like that:

SQL> select rdb$field_name, rdb$collation_id from rdb$fields where
rdb$field_type in (14, 37) or (rdb$field_type=261 and rdb$field_sub_type=1);

RDB$FIELD_NAME RDB$COLLATION_ID
=============================================================== ================
RDB$CONTEXT_NAME 0
RDB$DESCRIPTION <null>
RDB$EDIT_STRING 0
RDB$FIELD_NAME 0
RDB$INDEX_NAME 0
RDB$QUERY_HEADER <null>
RDB$RELATION_NAME 0
RDB$SOURCE <null>
RDB$SECURITY_CLASS 0
RDB$FILE_NAME 0
RDB$FILE_NAME2 0
RDB$TRIGGER_NAME 0
RDB$GENERIC_NAME 0
RDB$FUNCTION_NAME 0
RDB$EXTERNAL_NAME 0
RDB$TYPE_NAME 0
RDB$MESSAGE 0
RDB$USER 0
RDB$PRIVILEGE 0
RDB$GENERATOR_NAME 0
RDB$CONSTRAINT_NAME 0
RDB$CONSTRAINT_TYPE 0
RDB$DEFERRABLE 0
RDB$MATCH_OPTION 0
RDB$RULE 0
RDB$PROCEDURE_NAME 0
RDB$PARAMETER_NAME 0
RDB$CHARACTER_SET_NAME 0
RDB$COLLATION_NAME 0
RDB$EXCEPTION_NAME 0
RDB$GUID 0
RDB$SPECIFIC_ATTRIBUTES <null>
RDB$PLUGIN 0
RDB$REMOTE_PROTOCOL 0
RDB$REMOTE_ADDRESS 0
RDB$CONTEXT_VAR_NAME 0
RDB$CONTEXT_VAR_VALUE 0
RDB$ENGINE_NAME 0
RDB$PACKAGE_NAME 0
RDB$ARGUMENT_NAME 0
SEC$USER_NAME 0
SEC$KEY 0
SEC$VALUE 0
SEC$NAME_PART 0
RDB$CLIENT_VERSION 0
RDB$REMOTE_VERSION 0
RDB$HOST_NAME 0
RDB$OS_USER 0
RDB$AUTH_METHOD 0
MON$SEC_DATABASE 0
RDB$MAP_NAME 0
RDB$MAP_USING 0
RDB$MAP_DB 0
RDB$MAP_FROM_TYPE 0
RDB$MAP_FROM 0
RDB$MAP_TO 0
RDB$PLAN <null>
RDB$SYSTEM_PRIVILEGES 0
RDB$TIME_ZONE_NAME 0
RDB$DBTZ_VERSION 0
MON$WIRE_CRYPT_PLUGIN 0
RDB$PUBLICATION_NAME 0
RDB$FILE_ID 0
RDB$CONFIG_NAME 0
RDB$CONFIG_VALUE 0
RDB$KEYWORD_NAME 0
RDB$SHORT_DESCRIPTION 0
RDB$VARBINARY_MAX 0

--
WBR, SD.

Adriano dos Santos Fernandes

unread,
Oct 9, 2023, 5:40:24 AM10/9/23
to firebir...@googlegroups.com
On 07/10/2023 06:19, 'Dimitry Sibiryakov' via firebird-devel wrote:
> Adriano dos Santos Fernandes wrote 07.10.2023 2:16:
>>>    BTW, the values in this field is inconsistent for system domains.
>>> Some
>>> record has NULL and some 0.
>>>
>> Some? Some what/when?
>
>   Some like that:
>
> SQL> select rdb$field_name, rdb$collation_id from rdb$fields where
> rdb$field_type in (14, 37) or (rdb$field_type=261 and
> rdb$field_sub_type=1);
>

So it's all text blobs.

Next important thing is understand if that happens with non-system
fields, when creating or after changes (in fields or domains).


Adriano

Dimitry Sibiryakov

unread,
Oct 9, 2023, 5:52:32 AM10/9/23
to firebir...@googlegroups.com
Adriano dos Santos Fernandes wrote 09.10.2023 11:40:
> So it's all text blobs.
>
> Next important thing is understand if that happens with non-system
> fields, when creating or after changes (in fields or domains).

So far it wasn't noticed.
But the question is still here: how to interpret NULL in collation id field
if there is no obvious "parent entity" (such as RDB$FIELDS for RDB$RELATION_FIELDS).

--
WBR, SD.
Reply all
Reply to author
Forward
0 new messages