Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
51.20. pg_enum
Prev UpChapter 51. System CatalogsHome Next

51.20. pg_enum#

Thepg_enum catalog contains entries showing the values and labels for each enum type. The internal representation of a given enum value is actually the OID of its associated row inpg_enum.

Table 51.20. pg_enum Columns

Column Type

Description

oidoid

Row identifier

enumtypidoid (referencespg_type.oid)

The OID of thepg_type entry owning this enum value

enumsortorderfloat4

The sort position of this enum value within its enum type

enumlabelname

The textual label for this enum value


The OIDs forpg_enum rows follow a special rule: even-numbered OIDs are guaranteed to be ordered in the same way as the sort ordering of their enum type. That is, if two even OIDs belong to the same enum type, the smaller OID must have the smallerenumsortorder value. Odd-numbered OID values need bear no relationship to the sort order. This rule allows the enum comparison routines to avoid catalog lookups in many common cases. The routines that create and alter enum types attempt to assign even OIDs to enum values whenever possible.

When an enum type is created, its members are assigned sort-order positions 1..n. But members added later might be given negative or fractional values ofenumsortorder. The only requirement on these values is that they be correctly ordered and unique within each enum type.


Prev Up Next
51.19. pg_description Home 51.21. pg_event_trigger
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp