You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Daniel John Debrunner <dj...@apache.org> on 2007/06/08 03:51:58 UTC

Minor inconsistency in collation wiki page.

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.

Re: Minor inconsistency in collation wiki page.

Posted by Mamta Satoor <ms...@gmail.com>.
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 <ms...@gmail.com> 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 <dj...@apache.org> 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.
> >
>
>

Re: Minor inconsistency in collation wiki page.

Posted by Mamta Satoor <ms...@gmail.com>.
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 <dj...@apache.org> 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.
>