postgresql 查看 enum

select * from pg_type where typname = 'managertype';

typname        | typnamespace | typowner | typlen | typbyval | typtype | typcategory | typispreferred | typisdefined | typdelim | typrelid | typelem | typarray | typinput | typoutput |  
managertype | 2200                | 118065    | 4         | t             | e           | E                 | f                      | t                   | ,             | 0           | 0            | 158707 | enum_in | enum_out

typreceive   |typsend        | typmodin | typmodout | typanalyze | typalign | typstorage | typnotnull | typbasetype | typtypmod | typndims | typcollation | typdefaultbin | typdefault | typacl 

enum_recv | enum_send | -               | -                | -                 | i             | p                | f               | 0                   | -1               | 0             | 0                 |                      |                  |

select * from pg_enum;

 enumtypid | enumsortorder |     enumlabel     

158708       | 1                      | admin
158708       | 2                      | developer
158708       | 3                      | editor

原文地址:https://www.cnblogs.com/cdyboke/p/7452494.html