Subject RE: [firebird-support] system tables - second attempt.
Author Svend Meyland Nicolaisen
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Martijn Tonies
> Sent: 16. april 2005 21:19
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] system tables - second attempt.
>
>
>
> > > > >> which brings the question how do you tell between a
> > > column defined
> > > > >> as "SOMEFIELD" and a column defined as SOMEFIELD?
> > > >
> > > > MT> Try creating such a table and you'll know :-)
> > > >
> > > > good idea. :-)
> > > > It appears that if you delimit an all-uppercase identifier
> > > the engine
> > > > behaves as if you didn't, i.e. you can refer to it in lower
> > > or mixed
> > > > case without quotes. I don't know whether that's documented
> > > behaviour
> > > > or not; I didn't know it for sure.
> > >
> > > As far as I know, it is. All uppercase equals no quotes.
> > >
> > > Unless you've used a keyword, of course.
> >
> >
> > I suspect that all field names basically are treated as
> case sensitive
> > by the FireBird engine. However when not using quotes the
> field name
> > is converted to all upper case before it is "handed" to the
> FireBird engine.
> > This makes it look like that the engine isn't case sensitive. I
> > haven't looked at the code though so maybe I'm wrong.....
>
> No no no ... "case sensitivity" was a new feature in
> InterBase 6, dialect 3 only. The dialect 3 was created for
> this feature.
>
> Case sensitivity is defined in the SQL standard, database
> engines that want to adhere to the standard need to implement
> this feature.
>
> It's easy: when using quotes, the name becomes case sensitive
> if it's not in full uppercase.
>
> That's it. Period.
>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird,
> MySQL & MS SQL Server Upscene Productions http://www.upscene.com


I agree with you that quoted case sensitivity were introduced with dialect 3
(additional changes were made too) to support the SQL standard. But that
doesn't necessary make what I've stated earlier wrong. All I have said is
that it seems like FireBird internally works case sensitive. You don't
notice it in dialect 1 because everything is converted to upper case before
processing. To me this explanation helps understand how quoted and unquoted
fields behave in dialect 3. I'm sorry if it is confusing others.....

Kind regards
Svend