Subject | Re: [Firebird-Architect] Default collation |
---|---|
Author | Helen Borrie |
Post date | 2008-04-13T07:49:07Z |
At 05:10 PM 13/04/2008, Dmitry Yemanov wrote:
COLLATION is fair enough for naming the object in CREATE COLLATION, if you must. It is at least consistent with CREATE TABLE, CREATE INDEX, yada yada yada, and anyway, we are stuck with it.
But the proposed syntax for the clause is really dumb on several counts:
e.g. CREATE DATABASE ....
CHARACTER SET BLAH SET DEFAULT COLLATION
is really dumb. What do the keywords SET (usage as a verb additional to usage as part of a noun phrase just preceding it) and DEFAULT achieve?
CREATE DATABASE ...
CHARACTER SET BLAH COLLATE B_BLAH
is totally consistent with the other places in Fb's language where COLLATE [ORDER] is being set, while [anything] COLLATE isn't consistent with anything.
I suppose your only argument might be that
ALTER DATABASE SET COLLATION B_BLAH sounds more English-like. But
ALTER DATABASE COLLATE B_BLAH is quite acceptable SQL grammar, according to our other ALTER phraseology.
Consider
ALTER TABLE
ALTER aField TYPE VARCHAR(20)
or
ALTER INDEX IDX INACTIVE
... and so on. We don't poke "SET" in there, do we? So the argument for poking such elements in anywhere is weak at best.
Helen
>Helen Borrie wrote:I disagree, seriously.
>>
>> Not to mention that COLLATE (not COLLATION or any other invention) is the keyword that *already* exists in Firebird's SQL grammar for the purpose of specifying a <collation order> *and* COLLATE is the SQL-92 keyword, to boot.
>
>Both COLLATE and COLLATION are keywords in SQL2003. And the latter one
>exists in our grammar since, I believe, v2.1.
>
>The SQL spec declares CREATE/DROP COLLATION and <value> COLLATE <order>,
>and so far we comply. As you can see, it confirms my "verb vs noun"
>explanation :-) But both extensions proposed by Adriano are non-standard
>and we have to choose a proper syntax.
>
>Looking at the proposed SET DEFAULT COLLATE <name>, I can see some
>similarity in the standard which mentions SET COLLATION <name> for a
>session. Again, COLLATION is used for a noun.
>
>So I still think that COLLATION is a proper choice of a keyword for the
>features we discuss.
COLLATION is fair enough for naming the object in CREATE COLLATION, if you must. It is at least consistent with CREATE TABLE, CREATE INDEX, yada yada yada, and anyway, we are stuck with it.
But the proposed syntax for the clause is really dumb on several counts:
e.g. CREATE DATABASE ....
CHARACTER SET BLAH SET DEFAULT COLLATION
is really dumb. What do the keywords SET (usage as a verb additional to usage as part of a noun phrase just preceding it) and DEFAULT achieve?
CREATE DATABASE ...
CHARACTER SET BLAH COLLATE B_BLAH
is totally consistent with the other places in Fb's language where COLLATE [ORDER] is being set, while [anything] COLLATE isn't consistent with anything.
I suppose your only argument might be that
ALTER DATABASE SET COLLATION B_BLAH sounds more English-like. But
ALTER DATABASE COLLATE B_BLAH is quite acceptable SQL grammar, according to our other ALTER phraseology.
Consider
ALTER TABLE
ALTER aField TYPE VARCHAR(20)
or
ALTER INDEX IDX INACTIVE
... and so on. We don't poke "SET" in there, do we? So the argument for poking such elements in anywhere is weak at best.
Helen