Subject Re: [firebird-support] FB3 alter domain colltion
Author Helen Borrie
Karol Bieniaszewski wrote:

> when we create dommain we can do:
> CREATE DOMAIN XXX TYPE VARCHAR(50) COLLATE PXW_PLK;
>
> but how to alter this domain to have still collation?
>
> ALTER DOMAIN XXX TYPE VARCHAR(150) COLLATE PXW_PLK;
>
>
> Engine Code : 335544569
> Engine Message :
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 1, column 38
> COLLATE
>
> is this possible or i should create ticket/or it already exists?

It is not clear why you included a COLLATE clause in an ALTER DOMAIN
statement. You can't change the COLLATE property of a domain, which
is why you got the error: COLLATE is not expected in an ALTER DOMAIN
statement. But you were not trying to change that, anyway.

An ALTER DOMAIN statement does not drop the existing domain. It
allows valid changes to properties that can be changed. All you
needed here was:

ALTER DOMAIN XXX TYPE VARCHAR(150)

It is allowed, because (1) VARCHAR and VARCHAR are compatible and (2)
the new size is longer than the old size. No other properties are
affected.

HB