In next couple days, I will start looking at implementing return value for user defined functions to take the collation of the schema in which the user defined function is declared.
Mamta On 6/7/07, Mamta Satoor <[EMAIL PROTECTED]> wrote:
Hi Dan, Although I haven't spent much time on this, the changes suggested by you seem to make sense. That way, the behavior is consistent and can be explained with one rule "the character set of the schema associated with an object" in all different scenarios of say CHAR(10) Mamta On 6/7/07, Daniel John Debrunner <[EMAIL PROTECTED]> wrote: > > http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478 > > In the list of collation rules on this page I think there is a minor > inconsistency, or maybe some clarification needed. > > Item "3)<character string type>" defines the implementation defined for > explicit character types, such as 'CHAR(10)'. > > As an example rule 4) for CAST correctly is based upon rule 3. > > > Item 7, however for user defined function's returns clause, e.g. > 'RETURNS CHAR(10)' applies a different rule, even though according to > the SQL standard CHAR(10) in a returns clause is the same as CHAR(10) in > a CAST, in fact the same everywhere except in a column definition. > > I can see the logic for rule 7 and it is probably correct, which just > means I think the implementation defined rule for 3) needs to be > clarified or expanded. Maybe replace: > > Derby's implementation-defined character set for such <character string > type> to be current schema's character set. > > with > > Derby's implementation-defined character set for such <character string > type> to be the character set of the schema associated with an object. > For a DDL statement it is the schema the object resides in, for any > other statement it is the current compilation schema. > > Dan. >
