diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2015-05-09 13:06:49 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2015-05-09 13:06:49 -0400 |
commit | 0c90f6769de6a60f842c916d49b404d03bcc503a (patch) | |
tree | 519db4b7b0d468bd6df426169fcea5eb0688697b /src/backend/utils/adt/selfuncs.c | |
parent | 0cf56f14dd15532fec930b502cb6457023b01ef8 (diff) | |
download | postgresql-0c90f6769de6a60f842c916d49b404d03bcc503a.tar.gz postgresql-0c90f6769de6a60f842c916d49b404d03bcc503a.zip |
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
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 4dd3f9fbce1..a28868c3130 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -3619,6 +3619,7 @@ convert_to_scalar(Datum value, Oid valuetypid, double *scaledvalue, case REGTYPEOID: case REGCONFIGOID: case REGDICTIONARYOID: + case REGROLEOID: *scaledvalue = convert_numeric_to_scalar(value, valuetypid); *scaledlobound = convert_numeric_to_scalar(lobound, boundstypid); *scaledhibound = convert_numeric_to_scalar(hibound, boundstypid); @@ -3724,6 +3725,7 @@ convert_numeric_to_scalar(Datum value, Oid typid) case REGTYPEOID: case REGCONFIGOID: case REGDICTIONARYOID: + case REGROLEOID: /* we can treat OIDs as integers... */ return (double) DatumGetObjectId(value); } |