Subject Re: [ib-support] Default database collation
Author Helen Borrie
I had written:
> > You need to specify the collation order when declaring domains and/or
> > columns. You can also specify the collation order in a GROUP BY clause.

At 12:10 PM 13-05-02 +0200, Achim Kalwa wrote:

>is this different behaviour from Interbase 6.0?

No, it hasn't been changed.

>So what is the default character set for?

If you declare a default character set at CREATE DATABASE, that will be the
character set used for all text columns (CHAR, VARCHAR and text BLOB)
unless you specify something different at domain or column level. However,
to make that work, you need to connect using that default character set for
the, you see, running a CREATE DATABASE script that sets
the default charset will place your session in that charset, when it
connects to the db after creating it. In future sessions, the server won't
know it, unless you set it either on connection, or with SET NAMES.

>I just ran into problems by adding a new varchar-field to an existing
>table: "alter table AUFTRAG add E_USER varchar(30)"
>The new field has no character set defined.

Before you go racing off on the assumption that the new column has no
character set defined, make sure that you've tested to be certain it's not
taking the default for the database. You could test it by trying to insert
_NONE character data into the field. If it is NONE, it will take anything
at all; if it is WIN1250 (or something else) you should get a
transliteration error.

insert into aTable(oldcol, newcol)
values('something', _NONE 'something in charset WIN1250')

What could have happened is that you connected to the database using
character set NONE. Any new columns you defined without a character set
would (I think) take the character set of the connection.


All for Open and Open for All
Firebird Open SQL Database · ·