The collation module defines two classes, Collation and CollationDict, derived from DbSchemaObject and DbObjectDict, respectively.


Collation is derived from DbSchemaObject and represents a PostgreSQL collation (available on PostgreSQL 9.1 or later).

class pyrseas.dbobject.collation.Collation(name, schema, description, owner, lc_collate, lc_ctype, oid=None)

A collation definition

static Collation.from_map(name, schema, inobj)

Initialize a Collation instance from a YAML map

  • name – collation name
  • name – schema map
  • inobj – YAML map of the collation

Collation instance

Collation.create(obj, *args, **kwargs)

Return SQL statements to CREATE the collation

Returns:SQL statements

Collation Dictionary

CollationDict is derived from DbObjectDict. It is a dictionary that represents the collection of collations in a database.

class pyrseas.dbobject.collation.CollationDict(dbconn=None)

The collection of collations in a database.

CollationDict.from_map(schema, inmap)

Initialize the dictionary of collations by examining the input map

  • schema – the schema owing the collations
  • inmap – the input YAML map defining the collations