34.19. data_type_privileges

Представление data_type_privileges описывает все дескрипторы типов данных, к которым имеет доступ текущий пользователь, являясь их владельцем или имея некоторые права для них. Дескриптор типа данных формируется, когда тип данных задействуется в определении колонки таблицы, домена или функции (в качестве типа параметра или результата), и хранит некоторую информацию о том, как этот тип используется в данном случае (например, объявленную максимальную длину, если это применимо). Каждому дескриптору типа данных назначается уникальный идентификатор, уникальный среди всех дескрипторов типов, назначаемых одному объекту (таблица, домен, функция). Это представление, вероятно, не полезно для приложений, но на его базе определены некоторые другие представления в информационной схеме.

Таблица 34-17. Колонки data_type_privileges

ИмяТип данныхОписание
object_catalogsql_identifierИмя базы данных, содержащей описываемый объект (всегда текущая база)
object_schemasql_identifierИмя схемы, содержащей описываемый объект
object_namesql_identifierИмя описываемого объекта
object_typecharacter_dataТип описываемого объекта: TABLE (дескриптор типа данных относится к колонке этой таблицы), DOMAIN (дескриптор типа данных относится к домену) или ROUTINE (дескриптор типа данных относится к типу данных параметра или результата функции).
dtd_identifiersql_identifierИдентификатор дескриптора типа данных, уникальный среди дескрипторов типов для этого же объекта.

34.19. data_type_privileges

The view data_type_privileges identifies all data type descriptors that the current user has access to, by way of being the owner of the described object or having some privilege for it. A data type descriptor is generated whenever a data type is used in the definition of a table column, a domain, or a function (as parameter or return type) and stores some information about how the data type is used in that instance (for example, the declared maximum length, if applicable). Each data type descriptor is assigned an arbitrary identifier that is unique among the data type descriptor identifiers assigned for one object (table, domain, function). This view is probably not useful for applications, but it is used to define some other views in the information schema.

Table 34-17. data_type_privileges Columns

NameData TypeDescription
object_catalogsql_identifierName of the database that contains the described object (always the current database)
object_schemasql_identifierName of the schema that contains the described object
object_namesql_identifierName of the described object
object_typecharacter_data The type of the described object: one of TABLE (the data type descriptor pertains to a column of that table), DOMAIN (the data type descriptors pertains to that domain), ROUTINE (the data type descriptor pertains to a parameter or the return data type of that function).
dtd_identifiersql_identifier The identifier of the data type descriptor, which is unique among the data type descriptors for that same object.
FAQ