1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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
This commit is contained in:
Andrew Dunstan
2015-05-09 13:06:49 -04:00
parent 0cf56f14dd
commit 0c90f6769d
20 changed files with 235 additions and 31 deletions

View File

@ -79,7 +79,7 @@ insert_username(PG_FUNCTION_ARGS)
args[0], relname)));
/* create fields containing name */
newval = CStringGetTextDatum(GetUserNameFromId(GetUserId()));
newval = CStringGetTextDatum(GetUserNameFromId(GetUserId(), false));
/* construct new tuple */
rettuple = SPI_modifytuple(rel, rettuple, 1, &attnum, &newval, NULL);

View File

@ -174,7 +174,7 @@ timetravel(PG_FUNCTION_ARGS)
}
/* create fields containing name */
newuser = CStringGetTextDatum(GetUserNameFromId(GetUserId()));
newuser = CStringGetTextDatum(GetUserNameFromId(GetUserId(), false));
nulltext = (Datum) NULL;