db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: DERBY-2831 create function in a non-existent schema causes null pointer exception
Date Fri, 29 Jun 2007 05:54:15 GMT
Thinking more about it, it seems that it does not matter what the collation
type might be for character strings involved in procedure definition because
procedures do not return a value in a way which can be used in a collation
operation in a sql and hence the collation does not matter in case of
procedures.

But in order to make sure that we always have the correct collation
associated with character strings, it does not hurt to store the proper
collation info for the character string parameters involved in the procedure
definition, just like what we do for functions. Because of this, I will plan
on making the correct collation setting for procedures too in the
CreateAliasNode.

Mamta


On 6/28/07, Mamta Satoor <msatoor@gmail.com> wrote:
>
> To answer your question about why are we changing character type
> descriptors oly for functions and not for procedures too, I will have to say
> that I over looked that. We should do this work for both functions and
> procedures. I will work on making that change for procedures too.
>
> thanks,
> Mamta
>
>
> On 6/28/07, Daniel John Debrunner <djd@apache.org> wrote:
> >
> > Mamta Satoor wrote:
> > > Hi,
> > >
> > > I am starting to work on DERBY-2831. For some reason the Jira entry
> > > *https://issues.apache.org/jira/browse/DERBY-2831*
> > >
> > > is not coming up correctly so I wanted to share on the list how I am
> > > thinking of fixing the bug. Let me know if anyone has any comments.
> > >
> > > Since a function can be created only in user schemas, I am thinking
> > that
> > > I can use DataDictionary.getCollationTypeOfUserSchemas to set the
> > > collation type in CreateAliasNode.typeDescriptorWithCorrectCollation
> > > rather than going through the function's schema name. I will start
> > > working towards that solution. If anyone has any feedback on it,
> > please
> > > let me know.
> >
> > Seems like this should not be logic confined to CreateAliasNode but
> > instead centralized for all DDL nodes. Shouldn't CreateAliasNode be
> > using DDLStatementNode.getSchemaDescriptor() and shouldn't the schema
> > descriptor returned by that method already have the correct collation
> > setup?
> >
> > Also the changing character type descriptors for RoutineAliasInfo in
> > CreateAliasNode is only performed for functions, not procedures? I don't
> > see any comments indicating why that is the case? Could you explain why
> > and add those comments to the code sometime?
> >
> > Thanks,
> > Dan.
> >
>
>

Mime
View raw message