[Dbix-class] Case sensitivity in column names using Oracle

Matt S Trout dbix-class at trout.me.uk
Tue Feb 14 17:07:23 CET 2006


On Tue, Feb 14, 2006 at 07:32:21AM -0800, Stephan Szabo wrote:
> 
> On Tue, 14 Feb 2006, Matt S Trout wrote:
> 
> > On Tue, Feb 14, 2006 at 11:31:12AM +0100, Karl.Moens at marsh.com wrote:
> > > Matt wrote:
> > >
> > > > does anybody know if
> > > > there are any databases that'll let you have foo, Foo and FOO all as
> > > column
> > > > names on the same table?
> > >
> > > At least MySQL does not allow you to have colums with names which only
> > > differ because of their case.
> >
> > Yeah, I already knew that. Trouble is what we need to know is if that's
> > the general case - one exception would cause breakage for people using said
> > exceptional DB and I'd prefer to avoid that if possible :)
> 
> 
> The spec explicitly seems to allow "FOO" and "foo" and "Foo" (with the
> quotes) as distinct identifiers. Paraphrased: two delimited identifiers
> are equivalent if their inner parts considered as a character string
> literal compare equally with an implementation-defined collation that is
> sensitive to case.  I know postgres should do this part properly (although
> it gets the case-folding for non-delimited identifiers wrong).

Thought as much :)

However, assinging column-info for Foo to a column called 'foo' or 'FOO'
*if* there's no declared column 'Foo' should be relatively reasonable, right?

If you have both, it won't matter. Hmm ... y'know, it'd probably be much
easier just top make columns_info_for actually ask for the column names
in the ResultSource rather than its current hackish %/* approach.

Zbigniew, fancy doing another revision of your columns_info_for code that
gets passed the $source object and does it that way?

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list