{"Entry":{"collection":"func","key":"enum-range","name":"enum_range","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.3"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"defedb8ee9fd4d8192badad917cce1cae9f341ff2332164c453f0e8c945167e6","first_version":"8.3","group":"enum","group_label":"Enum Support Functions","groups":["enum"],"imported_at":"2026-09-27T17:57:28.595038+08:00","last_version":"20","name":"enum_range","name_key":"enum_range","position":9002,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"enum_range ( anyenum ) → anyarray","signature_count":2,"slug":"enum-range","source_rev":"b7bd9cda","summary":"Returns all values of the input enum type in an ordered array.","summary_zh":""}},"Definition":{"Collection":"func","Key":"enum-range","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"enum-range","SourceRevision":"b7bd9cda","Facts":{"description":"Returns all values of the input enum type in an ordered array.","description_html":"Returns all values of the input enum type in an ordered array.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-ENUM-TABLE","file":"functions-enum.html","slug":"18"},"group":"enum","group_label":"Enum Support Functions","lang":"en","layout":"table-new","pages":["functions-enum.html"],"prose_only":false,"signatures":[{"description":"Returns all values of the input enum type in an ordered array.","description_html":"Returns all values of the input enum type in an ordered array.","description_zh":"","description_zh_html":"","examples":[{"expr":"enum_range(null::rainbow)","result":"{red,orange,yellow,​green,blue,purple}"}],"html":"\u003ccode class=\"function\"\u003eenum_range\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"enum_range ( anyenum ) → anyarray","zh_from":""},{"description":"Returns the range between the two given enum values, as an ordered array. The values must be from the same enum type. If the first parameter is null, the result will start with the first value of the enum type. If the second parameter is null, the result will end with the last value of the enum type.","description_html":"Returns the range between the two given enum values, as an ordered array. The values must be from the same enum type. If the first parameter is null, the result will start with the first value of the enum type. If the second parameter is null, the result will end with the last value of the enum type.","description_zh":"","description_zh_html":"","examples":[{"expr":"enum_range('orange'::rainbow, 'green'::rainbow)","result":"{orange,yellow,green}"},{"expr":"enum_range(NULL, 'green'::rainbow)","result":"{red,orange,​yellow,green}"},{"expr":"enum_range('orange'::rainbow, NULL)","result":"{orange,yellow,green,​blue,purple}"}],"html":"\u003ccode class=\"function\"\u003eenum_range\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e, \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"enum_range ( anyenum, anyenum ) → anyarray","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ENUM-TABLE","file":"functions-enum.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"enum-range","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"enum_range","Summary":"将输入枚举类型的所有值作为一个有序的数组返回。","BodyHTML":"将输入枚举类型的所有值作为一个有序的数组返回。\u003cpre\u003eenum_range ( anyenum ) → anyarray\u003c/pre\u003e将输入枚举类型的所有值作为一个有序的数组返回。\u003cpre\u003eenum_range ( anyenum, anyenum ) → anyarray\u003c/pre\u003e以有序数组返回两个给定枚举值之间的范围。两个值必须来自同一枚举类型。如果第一个参数为 null，结果从该枚举类型的第一个值开始；如果第二个参数为 null，结果以该枚举类型的最后一个值结束。","SourceRevision":"ca936764","ContentHash":"91648a041975054b0457bafe4e084241ca310260929656d30d5c95619cdfacb6","Payload":{"description_zh":"将输入枚举类型的所有值作为一个有序的数组返回。","description_zh_html":"将输入枚举类型的所有值作为一个有序的数组返回。","signatures":[{"description_zh":"将输入枚举类型的所有值作为一个有序的数组返回。","description_zh_html":"将输入枚举类型的所有值作为一个有序的数组返回。","returns":"anyarray","text":"enum_range ( anyenum ) → anyarray","zh_from":"doc"},{"description_zh":"以有序数组返回两个给定枚举值之间的范围。两个值必须来自同一枚举类型。如果第一个参数为 null，结果从该枚举类型的第一个值开始；如果第二个参数为 null，结果以该枚举类型的最后一个值结束。","description_zh_html":"以有序数组返回两个给定枚举值之间的范围。两个值必须来自同一枚举类型。如果第一个参数为 null，结果从该枚举类型的第一个值开始；如果第二个参数为 null，结果以该枚举类型的最后一个值结束。","returns":"anyarray","text":"enum_range ( anyenum, anyenum ) → anyarray","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"4d369c01b27807efa3628225e326dbcd4147ab368c90b6d8b1eda61ddb2e1d92","Text":"enum_range ( anyenum ) → anyarray","Returns":"anyarray","Payload":{"description":"Returns all values of the input enum type in an ordered array.","description_html":"Returns all values of the input enum type in an ordered array.","description_zh":"","description_zh_html":"","examples":[{"expr":"enum_range(null::rainbow)","result":"{red,orange,yellow,​green,blue,purple}"}],"html":"\u003ccode class=\"function\"\u003eenum_range\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"enum_range ( anyenum ) → anyarray","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"e270e9d2463142201852413b28d80184160b2fd49127be7cf4ca3ac6fe84584a","Text":"enum_range ( anyenum, anyenum ) → anyarray","Returns":"anyarray","Payload":{"description":"Returns the range between the two given enum values, as an ordered array. The values must be from the same enum type. If the first parameter is null, the result will start with the first value of the enum type. If the second parameter is null, the result will end with the last value of the enum type.","description_html":"Returns the range between the two given enum values, as an ordered array. The values must be from the same enum type. If the first parameter is null, the result will start with the first value of the enum type. If the second parameter is null, the result will end with the last value of the enum type.","description_zh":"","description_zh_html":"","examples":[{"expr":"enum_range('orange'::rainbow, 'green'::rainbow)","result":"{orange,yellow,green}"},{"expr":"enum_range(NULL, 'green'::rainbow)","result":"{red,orange,​yellow,green}"},{"expr":"enum_range('orange'::rainbow, NULL)","result":"{orange,yellow,green,​blue,purple}"}],"html":"\u003ccode class=\"function\"\u003eenum_range\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e, \u003ccode class=\"type\"\u003eanyenum\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"enum_range ( anyenum, anyenum ) → anyarray","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
