Subject Character set not preserved in view columns
Author zdeslav_v
hi everyone,

i am using FB 1.5.2.4731 SS (although the same happens with embedded)
and i have the following problem:
when i generate the view with a column which concatenates varchar
columns from a table, the character set is not preserved. i am aware
that it makes sense that FB will not guess the character set, but i
don't know if this can be specified in some way.

Example:

SET SQL DIALECT 3;
SET NAMES WIN1250;
DEFAULT CHARACTER SET WIN1250;

CREATE TABLE CUSTOMER (
FIRST_NAME VARCHAR(128) CHARACTER SET WIN1250,
LAST_NAME VARCHAR(128) CHARACTER SET WIN1250
);

CREATE VIEW V_CUSTOMERS(FULL_NAME)
AS select c.first_name || ' ' || c.last_name
from customer c;

although first_name and last_name in CUSTOMER have win1250 character
set specified, full_name in V_CUSTOMERS doesn't.

my questions:
1. should FB use the default character set for the view column, or is
it my misunderstanding of how default charset works?
2. how can i specify the charset for the view column (i modified the
generated system domain for full_name column manually and that works)?
i suppose that i could modify the view column domain by changing some
entries in metadata tables, but is there some declarative way to do it
within the view definition?
3. does this behave the same in 2.0.* ?

thanks,
zdeslav