How to change column type in firebird3

Since firebird 3 I cannot change the column type

Before using this type of update:

update RDB$RELATION_FIELDS set
RDB$FIELD_SOURCE = 'MYTEXT'
where (RDB$FIELD_NAME = 'JXML') and
(RDB$RELATION_NAME = 'XMLTABLE')

because I get error ISC 335545030.

Maybe there is another way in firebird 3?

+4
source share
2 answers

Firebird 3 no longer allows direct updates to system tables, as this is a way to potentially corrupt the database. See Also System tables are now read-only in release notes. You will need to use DDL instructions to make changes.

It looks like you want to change the data type of the column in the domain. For this you will need to use alter table ... alter column .... In particular, you will need to do:

alter table XMLTABLE
    alter column JXML type MYTEXT;

:

: TYPE

TYPE , . , . , CHAR VARCHAR .

, .

, , .

Firebird 1 (InterBase 6.0).

+2
+1

Source: https://habr.com/ru/post/1692219/


All Articles