1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Add new OID alias type regnamespace

Catalog version bumped

Kyotaro HORIGUCHI
This commit is contained in:
Andrew Dunstan
2015-05-09 13:36:52 -04:00
parent 0c90f6769d
commit cb9fa802b3
13 changed files with 174 additions and 4 deletions

View File

@ -46,6 +46,12 @@ SELECT regrole('regtestrole');
regtestrole
(1 row)
SELECT regnamespace('pg_catalog');
regnamespace
--------------
pg_catalog
(1 row)
SELECT to_regoper('||/');
to_regoper
------------
@ -88,6 +94,12 @@ SELECT to_regrole('regtestrole');
regtestrole
(1 row)
SELECT to_regnamespace('pg_catalog');
to_regnamespace
-----------------
pg_catalog
(1 row)
-- with schemaname
SELECT regoper('pg_catalog.||/');
regoper
@ -186,6 +198,10 @@ SELECT regrole('regtestrole');
ERROR: role "regtestrole" does not exist
LINE 1: SELECT regrole('regtestrole');
^
SELECT regnamespace('nonexistent');
ERROR: schema "nonexistent" does not exist
LINE 1: SELECT regnamespace('nonexistent');
^
-- with schemaname
SELECT regoper('ng_catalog.||/');
ERROR: schema "ng_catalog" does not exist
@ -255,6 +271,12 @@ SELECT to_regrole('regtestrole');
(1 row)
SELECT to_regnamespace('nonexistent');
to_regnamespace
-----------------
(1 row)
-- with schemaname
SELECT to_regoper('ng_catalog.||/');
to_regoper

View File

@ -14,6 +14,7 @@ SELECT regprocedure('abs(numeric)');
SELECT regclass('pg_class');
SELECT regtype('int4');
SELECT regrole('regtestrole');
SELECT regnamespace('pg_catalog');
SELECT to_regoper('||/');
SELECT to_regoperator('+(int4,int4)');
@ -22,6 +23,7 @@ SELECT to_regprocedure('abs(numeric)');
SELECT to_regclass('pg_class');
SELECT to_regtype('int4');
SELECT to_regrole('regtestrole');
SELECT to_regnamespace('pg_catalog');
-- with schemaname
@ -51,6 +53,7 @@ SELECT regprocedure('absinthe(numeric)');
SELECT regclass('pg_classes');
SELECT regtype('int3');
SELECT regrole('regtestrole');
SELECT regnamespace('nonexistent');
-- with schemaname
@ -72,6 +75,7 @@ SELECT to_regprocedure('absinthe(numeric)');
SELECT to_regclass('pg_classes');
SELECT to_regtype('int3');
SELECT to_regrole('regtestrole');
SELECT to_regnamespace('nonexistent');
-- with schemaname