User views
The following table describes the views that display user
information. To see a view, users must have the privilege to list
the object.
View name | Description | Output | Ordered by | nzsql |
---|---|---|---|---|
_v_aggregate | Returns a list of all defined aggregates | objid, Aggregate, Owner, CreateDate | Aggregate | \da |
_v_database | Returns a list of all databases | objid, Database, Owner, CreateDate | Database | \l |
_v_datatype | Returns a list of all system data types | objid, DataType, Owner, Description, Size | DataType | \dT |
_v_function | Returns a list of all defined functions | objid, Function, Owner, CreateDate, Description, Result, Arguments | Function | \df |
_v_group | Returns a list of all groups | objid, GroupName, Owner, CreateDate | GroupName | \dg |
_v_groupusers | Returns a list of all users of a group | objid, GroupName, Owner, UserName | GroupName, UserName | \dG |
_v_index | Returns a list of all user indexes | objid, IndexName, TableName, Owner, CreateDate | TableName, IndexName | \di |
_v_operator | Returns a list of all defined operators | objid, Operator, Owner, CreateDate, Description, oprname, oprleft, oprright, oprresult, oprcode, and oprkind | Operator | \do |
_v_procedure | Returns a list of all the stored procedures and their attributes | objid, procedure, owner, createdate, objtype, description, result, numargs, arguments, proceduresignature, builtin, proceduresource, sproc, and executedasowner | Procedure | |
_v_relation_column | Returns a list of all attributes of a relation (table, view, index.) | objid, ObjectName, Owner, CreateDate, ObjectType, attnum, attname, format_type(attypid,attypmod), and attnotnull | ObjectName, and attnum | |
_v_relation_column_def | Returns a list of all attributes of a relation that have defined defaults | objid, ObjectName, Owner, CreateDate, Objecttype, attnum, attname, and adsrc | ObjectName, and attnum | |
_v_sequence | Returns a list of all defined sequences | objid, SeqName, Owner, and CreateDate | SeqName | \ds |
_v_session | Returns a list of all active sessions | ID, PID, UserName, Database, ConnectTime, ConnStatus, and LastCommand | ID | \act |
_v_table | Returns a list of all user tables | objid, TableName, Owner, and CreateDate | TableName | \dt |
_v_table_dist_map | Returns a list of all fields that are used to determine the table’s data distribution | objid, TableName, Owner, CreateDate, DistNum, and DistFldName | TableName, and DistNum | |
_v_table_index | Returns a list of all user table indexes | T.objid, TableName, T.Owner, IndexName, CreateDate, I.indkey, l.indisunique, l.indisprimary, T.relhasrules, and T.relnatts | TableName, and IndexName | |
_v_user | Returns a list of all users | objid, UserName, Owner, ValidUntil, and CreateDate | UserName | \du |
_v_usergroups | Returns a list of all groups of which the user is a member | objid, UserName, Owner, and GroupName | UserName, and GroupName | \dU |
_v_view | Returns a list of all user views | objid, ViewName, Owner, CreateDate, relhasindex, relkind, relchecks, reltriggers, relhasrules, relukeys, relfkeys, relhaspkey, and relnatts | ViewName | \dv |