37.28. foreign_servers
Представление foreign_servers
показывает все сторонние серверы, определённые в текущей базе данных. В нём показываются только те сторонние серверы, к которым имеет доступ текущий пользователь (являясь их владельцем или имея некоторые права).
Таблица 37.26. Столбцы foreign_servers
Имя | Тип данных | Описание |
---|---|---|
foreign_server_catalog | sql_identifier | Имя базы данных, в которой определён сторонний сервер (всегда текущая база) |
foreign_server_name | sql_identifier | Имя стороннего сервера |
foreign_data_wrapper_catalog | sql_identifier | Имя базы данных, в которой определена обёртка сторонних данных, используемая сторонним сервером (всегда текущая база) |
foreign_data_wrapper_name | sql_identifier | Имя обёртки сторонних данных, используемой сторонним сервером |
foreign_server_type | character_data | Информация о типе стороннего сервера, если она была указана при его создании |
foreign_server_version | character_data | Информация о версии стороннего сервера, если она была указана при его создании |
authorization_identifier | sql_identifier | Имя владельца стороннего сервера |
9.10. Enum Support Functions
For enum types (described in Section 8.7), there are several functions that allow cleaner programming without hard-coding particular values of an enum type. These are listed in Table 9.32. The examples assume an enum type created as:
CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple');
Table 9.32. Enum Support Functions
Notice that except for the two-argument form of enum_range
, these functions disregard the specific value passed to them; they care only about its declared data type. Either null or a specific value of the type can be passed, with the same result. It is more common to apply these functions to a table column or function argument than to a hardwired type name as suggested by the examples.