Thread: pgsql: Add new OID alias type regrole

pgsql: Add new OID alias type regrole

From
Andrew Dunstan
Date:
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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0c90f6769de6a60f842c916d49b404d03bcc503a

Modified Files
--------------
contrib/spi/insert_username.c         |    2 +-
contrib/spi/timetravel.c              |    2 +-
doc/src/sgml/datatype.sgml            |   27 +++++++--
src/backend/bootstrap/bootstrap.c     |    2 +
src/backend/catalog/dependency.c      |   10 ++++
src/backend/catalog/objectaddress.c   |   20 +++----
src/backend/utils/adt/acl.c           |    2 +-
src/backend/utils/adt/name.c          |    4 +-
src/backend/utils/adt/regproc.c       |  104 +++++++++++++++++++++++++++++++++
src/backend/utils/adt/selfuncs.c      |    2 +
src/backend/utils/cache/catcache.c    |    1 +
src/backend/utils/init/miscinit.c     |   24 +++++---
src/include/catalog/pg_cast.h         |    7 +++
src/include/catalog/pg_proc.h         |   12 ++++
src/include/catalog/pg_type.h         |    5 ++
src/include/foreign/foreign.h         |    2 +-
src/include/miscadmin.h               |    2 +-
src/include/utils/builtins.h          |    5 ++
src/test/regress/expected/regproc.out |   26 ++++++++-
src/test/regress/sql/regproc.sql      |    7 +++
20 files changed, 235 insertions(+), 31 deletions(-)