.. _CREATE TYPE AS ENUM: https://www.postgresql.org/docs/current/static/datatype-enum.html
In order to set up a bidirectional enum mapping, you should get information
-about the PostgreSQL enum using the `~types.enum.EnumInfo` class and to
+about the PostgreSQL enum using the `~types.enum.EnumInfo` class and
register it using `~types.enum.register_enum()`. The behaviour of unregistered
and registered enums is different.
- Pure `!Enum` classes are dumped as normal strings, using their member
names as value. The unknown oid is used, so PostgreSQL should be able to
- use this string is most contexts (such as an enum or a text field).
+ use this string in most contexts (such as an enum or a text field).
- Mix-in enums are dumped according to their mix-in type (because a `class
MyIntEnum(int, Enum)` is more specifically an `!int` than an `!Enum`, so
.. autoclass:: psycopg.types.enum.EnumInfo
- `!EnumInfo` is a `~psycopg.types.TypeInfo` subclass: check its
- documentation for the generic usage, especially the
+ `!EnumInfo` is a subclass of `~psycopg.types.TypeInfo`: refer to the
+ latter's documentation for generic usage, especially the
`~psycopg.types.TypeInfo.fetch()` method.
.. attribute:: labels