Name

charset_canonical_name, complete_collation_name, collation_order_string, rdf_collation_order_string — resolve charset/collation names and obtain collation-keyed sort strings

Synopsis

varchar charset_canonical_name( in name varchar);
 
varchar complete_collation_name( in name varchar,
  in mode integer);
 
any collation_order_string( in collation_name varchar,
  in string any);
 
any rdf_collation_order_string( in collation_name varchar,
  in rdf_box any);
 

Description

charset_canonical_name returns the canonical name of the character set identified by name. Common aliases such as 'UTF8', 'utf-8', 'LATIN1', etc. resolve to their canonical forms (UTF-8, ISO8859-1, ...). Returns SQL NULL if no character set matches the name.

complete_collation_name resolves a possibly partial collation name to its fully qualified form using the session's default qualifier. mode selects the resolution strategy (0 looks up an existing collation, non-zero modes consult the system catalog more aggressively). Returns NULL when no matching collation is found.

collation_order_string returns the collation-specific sort key for string under the named collation. Two values compare equal under that collation if and only if their sort keys are byte-equal, so the returned key can be used to drive case- and accent-insensitive comparisons via plain binary comparison. Raises SQL state 22023 (IN006) if the named collation does not exist.

rdf_collation_order_string is the SPARQL/RDF counterpart that takes a Virtuoso RDF box, unwraps it to its lexical form, and returns the collation-keyed sort string. Used by SPARQL's ORDER BY machinery when an explicit collation has been requested.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®