Fowler, Jeff wrote:
I may very well be mistaken - wouldn't be the first time!! I tried to
access the actual specification from ANSI (www.ansi.org), but you either
have to purchase them or access one of the "drafts" (which a couple
folks in this thread have done), but the draft may or may not match the
actual standard. While Dr. Hipp's new RTRIM collation makes this a moot
point, the source for my statement came from this article:
http://support.microsoft.com/kb/316626

After reading the MS article, I dug into the standard some more to see if I had missed something.

It seems there is a requirement that all "standard character set names" define a default collation that has the PAD SPACE property (see section 10.6 general rule 2).

2) A <standard character set name> specifies the name of a character set that is defined by a national or international standard. The character repertoire of CS, implied by the <standard character set name>, are defined by the standard defining the character set identified by that <standard character set name>. The default collating sequence of the character set is defined by the order of the characters in the standard and has the PAD SPACE characteristic.
There is a similar definition for an "implementation defined character set name" in general rule 3.
3) An <implementation-defined character set name> specifies the name of a character set that is implementation-defined. The character repertoire of CS, implied by the <implementationdefined character set name>, are implementation-defined. The default collating sequence of the character set and whether the collating sequence has the NO PAD characteristic or the PAD
SPACE characteristic is implementation-defined.
But syntax rule 1 in that section seems to say that what is supported is implementation defined.
1) The <standard character set name>s and <implementation-defined character set name>s that
are supported are implementation-defined.
These are character sets, and predefined collations, can be used to create additional collations as described in section 11.32
<collation definition> ::=
    CREATE COLLATION <collation name> FOR <character set specification>
    FROM <existing collation name>
    [ <pad characteristic> ]
<existing collation name> ::= <collation name>
<pad characteristic> ::=
    NO PAD
    | PAD SPACE
If the pad characteristic is not given explicitly, it is inherited implicitly from the existing collation name.

So if an implementation provides a standard character set, such as SQL_TEXT, it must also have a default collation with the PAD SPACE property that is the default collation for strings in that character set. The user can create a new collation that explicitly overrides the pad characteristic and use that for NO PAD operation.

But ultimately there is no requirement to provide any standard character sets. So all bets are off when switching implementations (as Darren has suggested).

Dennis Cote


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to