From 0c90f6769de6a60f842c916d49b404d03bcc503a Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 9 May 2015 13:06:49 -0400 Subject: Add new OID alias type regrole The new type has the scope of whole the database cluster so it doesn't behave the same as the existing OID alias types which have database scope, concerning object dependency. To avoid confusion constants of the new type are prohibited from appearing where dependencies are made involving it. Also, add a note to the docs about possible MVCC violation and optimization issues, which are general over the all reg* types. Kyotaro Horiguchi --- doc/src/sgml/datatype.sgml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index da1f25fe285..0cac9935d2d 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -4321,8 +4321,9 @@ SET xmloption TO { DOCUMENT | CONTENT }; an object identifier. There are also several alias types for oid: regproc, regprocedure, regoper, regoperator, regclass, - regtype, regconfig, and regdictionary. - shows an overview. + regtype, regrole, regconfig, and + regdictionary. shows + an overview. @@ -4430,6 +4431,13 @@ SELECT * FROM pg_attribute integer + + regrole + pg_authid + role name + smithee + + regconfig pg_ts_config @@ -4448,7 +4456,8 @@ SELECT * FROM pg_attribute - All of the OID alias types accept schema-qualified names, and will + All of the OID alias types for objects grouped by namespace accept + schema-qualified names, and will display schema-qualified names on output if the object would not be found in the current search path without being qualified. The regproc and regoper alias types will only @@ -4460,7 +4469,7 @@ SELECT * FROM pg_attribute - An additional property of the OID alias types is the creation of + An additional property of most of the OID alias types is the creation of dependencies. If a constant of one of these types appears in a stored expression (such as a column default expression or view), it creates a dependency @@ -4470,7 +4479,17 @@ SELECT * FROM pg_attribute understands that the default expression depends on the sequence my_seq; the system will not let the sequence be dropped without first removing the default expression. + regrole is the only exception for the property. Constants of this + type are not allowed in such expressions. + + + + + The OID alias types do not completely follow transaction isolation + rules. The planner also treats them as simple constants, which may + result in sub-optimal planning. + Another identifier type used by the system is xid, or transaction -- cgit v1.2.3