Subject RE: [IB-Architect] Character set and system tables
Author David Schnepper
The general rule is that columns are UNICODE_FSS if they contain any
"user defined" information (eg: column name, table name).

Columns are NONE if the feature was considered "deprecated" at version 4.0
(when columns were redefined as Unicode in preparation for I18N).

Columns are NONE if international character sets are not important
(module entry point, for example - I don't know of any languages that
support international characters in symbols that can be used to create
UDF's)

Columns are NONE if they contain OS dependent information (file_name).

Dave
I'm taking Claudio's list and documenting it.

rdb$exceptions.rdb$message - Exception messages must be in
ASCII
rdb$fields.rdb$edit_string - Deprecated
rdb$files.rdb$file_name - OS dependent
rdb$filters.rdb$entry_point - Only ASCII entry point names
supported
rdb$filters.rdb$module_name - Ditto
rdb$functions.rdb$entry_point - Ditto
rdb$functions.rdb$module_name - Ditto
rdb$log_files.rdb$file_name - OS dependant (also deprecated)
rdb$ref_constraints.rdb$delete_rule - Limited set of legal values
rdb$ref_constraints.rdb$match_option - Ditto
rdb$ref_constraints.rdb$update_rule - Ditto
rdb$relations.rdb$external_file - OS dependant
rdb$relation_constraints.rdb$constraint_type - Limited set of legal values
rdb$relation_constraints.rdb$deferrable - Limited set of legal values
rdb$relation_constraints.rdb$initially_deferred - Limited set of legal
values
rdb$relation_fields.rdb$edit_string - Deprecated
rdb$trigger_messages.rdb$message - Must be in ASCII
rdb$user_privileges.rdb$privilege - Limited set of legal
values

I can understand some of them being NONE, like ref_constraints.* and
relation_constraints.* and trigger_message.rdb$message. The latest seem to
keep constants that index a table of messages, maybe the interbase.msg file?

--- For SYSTEM triggers, the "message" is the symbolic name for the internal
error
number (which is used as an index into interbase.msg). This was for
Internationalization,
of course.
--- The reason Trigger & Exception messages are limited to ASCII was the
difficulty of doing it right. Strictly speaking you'd want to have a table
of
messages (<language>, <message>) with a default entry (for unknown language
or
missing text). NONE was a compromise that would enable a mono-locale,
non-English,
to at least have correct text.


I got the same number of system fields using charset NONE if I create a db
without any predefined charset.

-- The default character set is set AFTER a new database is created. (Which
is why
you can alter it without creating a new database).

Speaking of system tables, can anyone explain what's the idea behind
rdb$relation_constraints.rdb$deferrable
and
rdb$relation_constraints.rdb$initially_deferred
please?

-- The original implementor (in v4.0) was looking ahead to future support of
SQL Defered
constraints. (A SQL guru can correct me on this). Defered constraints are
constraints
that only have to be true at COMMIT time, and can be "relaxed" during a
sequence of
statements eg: UPDATE customers set custno = custno + 1;
This violates the unique constraint on custno during execution, but at
commit time
(or right after the statement) is consistant.
InterBase doesn't support this.
Initially_deferred -- A way you can defer a constraint when you create it.
(I think).

Dave

C.
---------
Claudio Valderrama C.
Ingeniero en Informática - Consultor independiente
http://members.tripod.com/cvalde


> -----Original Message-----
> From: Bill Karwin [mailto:bill@...]
> Sent: Domingo 16 de Abril de 2000 16:31
> To: IB-Architect@egroups.com
> Subject: Re: [IB-Architect] Character set and system tables
>
>
> "Claudio Valderrama C." wrote:
> > Excuse my doubt, but let's assume I create a db with a specific
> character
> > set, so all the char fields by default will pick that charset. Does this
> > affect system tables?
>
> Let's try:
>
> CREATE DATABASE 'foo.gdb' DEFAULT CHARACTER SET iso8859_1;
>
> SELECT R.RDB$RELATION_NAME, RF.RDB$FIELD_NAME, F.RDB$FIELD_NAME,
> C.RDB$CHARACTER_SET_NAME
> FROM RDB$RELATIONS R, RDB$RELATION_FIELDS RF, RDB$FIELDS F,
> RDB$CHARACTER_SETS C
> WHERE
> R.RDB$RELATION_NAME = RF.RDB$RELATION_NAME
> AND RF.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME
> AND F.RDB$CHARACTER_SET_ID = C.RDB$CHARACTER_SET_ID
> ORDER BY 1, 2;
>
> In IB 4.0 and 6.0 Classic server for Linux, many of these results are
> character set "NONE", and many of them are "UNICODE_FSS", regardless of
> the default character set specified.
>
> Bill


------------------------------------------------------------------------
Avoid the lines and visit avis.com for quick and easy online
reservations. Enjoy a compact car nationwide for only $29 a day!
Click here for more details.
http://click.egroups.com/1/3011/3/_/830676/_/955957342/
------------------------------------------------------------------------

To unsubscribe from this group, send an email to:
IB-Architect-unsubscribe@onelist.com