Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
005638e9
Commit
005638e9
authored
Mar 01, 2017
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix naming inconsistency
subobjid -> objsubid From: Jim Nasby <Jim.Nasby@BlueTreble.com>
parent
20f6d742
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
src/backend/catalog/objectaddress.c
src/backend/catalog/objectaddress.c
+6
-6
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+1
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+3
-3
src/test/regress/expected/object_address.out
src/test/regress/expected/object_address.out
+5
-5
src/test/regress/sql/object_address.sql
src/test/regress/sql/object_address.sql
+5
-5
No files found.
src/backend/catalog/objectaddress.c
View file @
005638e9
...
...
@@ -3468,7 +3468,7 @@ pg_describe_object(PG_FUNCTION_ARGS)
{
Oid
classid
=
PG_GETARG_OID
(
0
);
Oid
objid
=
PG_GETARG_OID
(
1
);
int32
subobj
id
=
PG_GETARG_INT32
(
2
);
int32
objsub
id
=
PG_GETARG_INT32
(
2
);
char
*
description
;
ObjectAddress
address
;
...
...
@@ -3478,7 +3478,7 @@ pg_describe_object(PG_FUNCTION_ARGS)
address
.
classId
=
classid
;
address
.
objectId
=
objid
;
address
.
objectSubId
=
subobj
id
;
address
.
objectSubId
=
objsub
id
;
description
=
getObjectDescription
(
&
address
);
PG_RETURN_TEXT_P
(
cstring_to_text
(
description
));
...
...
@@ -3492,7 +3492,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
{
Oid
classid
=
PG_GETARG_OID
(
0
);
Oid
objid
=
PG_GETARG_OID
(
1
);
int32
subobj
id
=
PG_GETARG_INT32
(
2
);
int32
objsub
id
=
PG_GETARG_INT32
(
2
);
Oid
schema_oid
=
InvalidOid
;
const
char
*
objname
=
NULL
;
ObjectAddress
address
;
...
...
@@ -3503,7 +3503,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
address
.
classId
=
classid
;
address
.
objectId
=
objid
;
address
.
objectSubId
=
subobj
id
;
address
.
objectSubId
=
objsub
id
;
/*
* Construct a tuple descriptor for the result row. This must match this
...
...
@@ -3608,7 +3608,7 @@ pg_identify_object_as_address(PG_FUNCTION_ARGS)
{
Oid
classid
=
PG_GETARG_OID
(
0
);
Oid
objid
=
PG_GETARG_OID
(
1
);
int32
subobj
id
=
PG_GETARG_INT32
(
2
);
int32
objsub
id
=
PG_GETARG_INT32
(
2
);
ObjectAddress
address
;
char
*
identity
;
List
*
names
;
...
...
@@ -3620,7 +3620,7 @@ pg_identify_object_as_address(PG_FUNCTION_ARGS)
address
.
classId
=
classid
;
address
.
objectId
=
objid
;
address
.
objectSubId
=
subobj
id
;
address
.
objectSubId
=
objsub
id
;
/*
* Construct a tuple descriptor for the result row. This must match this
...
...
src/include/catalog/catversion.h
View file @
005638e9
...
...
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
#define CATALOG_VERSION_NO 20170
223
1
#define CATALOG_VERSION_NO 20170
301
1
#endif
src/include/catalog/pg_proc.h
View file @
005638e9
...
...
@@ -3096,13 +3096,13 @@ DESCR("get transaction Id and commit timestamp of latest transaction commit");
DATA
(
insert
OID
=
3537
(
pg_describe_object
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
25
"26 26 23"
_null_
_null_
_null_
_null_
_null_
pg_describe_object
_null_
_null_
_null_
));
DESCR
(
"get identification of SQL object"
);
DATA
(
insert
OID
=
3839
(
pg_identify_object
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"26 26 23"
"{26,26,23,25,25,25,25}"
"{i,i,i,o,o,o,o}"
"{classid,objid,
subobj
id,type,schema,name,identity}"
_null_
_null_
pg_identify_object
_null_
_null_
_null_
));
DATA
(
insert
OID
=
3839
(
pg_identify_object
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"26 26 23"
"{26,26,23,25,25,25,25}"
"{i,i,i,o,o,o,o}"
"{classid,objid,
objsub
id,type,schema,name,identity}"
_null_
_null_
pg_identify_object
_null_
_null_
_null_
));
DESCR
(
"get machine-parseable identification of SQL object"
);
DATA
(
insert
OID
=
3382
(
pg_identify_object_as_address
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"26 26 23"
"{26,26,23,25,1009,1009}"
"{i,i,i,o,o,o}"
"{classid,objid,
subobj
id,type,object_names,object_args}"
_null_
_null_
pg_identify_object_as_address
_null_
_null_
_null_
));
DATA
(
insert
OID
=
3382
(
pg_identify_object_as_address
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"26 26 23"
"{26,26,23,25,1009,1009}"
"{i,i,i,o,o,o}"
"{classid,objid,
objsub
id,type,object_names,object_args}"
_null_
_null_
pg_identify_object_as_address
_null_
_null_
_null_
));
DESCR
(
"get identification of SQL object for pg_get_object_address()"
);
DATA
(
insert
OID
=
3954
(
pg_get_object_address
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"25 1009 1009"
"{25,1009,1009,26,26,23}"
"{i,i,i,o,o,o}"
"{type,name,args,classid,objid,
subobj
id}"
_null_
_null_
pg_get_object_address
_null_
_null_
_null_
));
DATA
(
insert
OID
=
3954
(
pg_get_object_address
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
t
f
s
s
3
0
2249
"25 1009 1009"
"{25,1009,1009,26,26,23}"
"{i,i,i,o,o,o}"
"{type,name,args,classid,objid,
objsub
id}"
_null_
_null_
pg_get_object_address
_null_
_null_
_null_
));
DESCR
(
"get OID-based object address from name/args arrays"
);
DATA
(
insert
OID
=
2079
(
pg_table_is_visible
PGNSP
PGUID
12
10
0
0
0
f
f
f
f
t
f
s
s
1
0
16
"26"
_null_
_null_
_null_
_null_
_null_
pg_table_is_visible
_null_
_null_
_null_
));
...
...
src/test/regress/expected/object_address.out
View file @
005638e9
...
...
@@ -401,14 +401,14 @@ WITH objects (type, name, args) AS (VALUES
('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
('subscription', '{addr_sub}', '{}')
)
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.
subobj
id)).*,
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.
objsub
id)).*,
-- test roundtrip through pg_identify_object_as_address
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.
subobj
id)) =
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.
subobj
id))
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.
objsub
id)) =
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.
objsub
id))
FROM objects, pg_get_object_address(type, name, args) addr1,
pg_identify_object_as_address(classid, objid,
subobj
id) ioa(typ,nms,args),
pg_identify_object_as_address(classid, objid,
objsub
id) ioa(typ,nms,args),
pg_get_object_address(typ, nms, ioa.args) as addr2
ORDER BY addr1.classid, addr1.objid, addr1.
subobj
id;
ORDER BY addr1.classid, addr1.objid, addr1.
objsub
id;
type | schema | name | identity | ?column?
---------------------------+------------+-------------------+----------------------------------------------------------------------+----------
default acl | | | for role regress_addr_user in schema public on tables | t
...
...
src/test/regress/sql/object_address.sql
View file @
005638e9
...
...
@@ -181,14 +181,14 @@ WITH objects (type, name, args) AS (VALUES
(
'publication relation'
,
'{addr_nsp, gentable}'
,
'{addr_pub}'
),
(
'subscription'
,
'{addr_sub}'
,
'{}'
)
)
SELECT
(
pg_identify_object
(
addr1
.
classid
,
addr1
.
objid
,
addr1
.
subobj
id
)).
*
,
SELECT
(
pg_identify_object
(
addr1
.
classid
,
addr1
.
objid
,
addr1
.
objsub
id
)).
*
,
-- test roundtrip through pg_identify_object_as_address
ROW
(
pg_identify_object
(
addr1
.
classid
,
addr1
.
objid
,
addr1
.
subobj
id
))
=
ROW
(
pg_identify_object
(
addr2
.
classid
,
addr2
.
objid
,
addr2
.
subobj
id
))
ROW
(
pg_identify_object
(
addr1
.
classid
,
addr1
.
objid
,
addr1
.
objsub
id
))
=
ROW
(
pg_identify_object
(
addr2
.
classid
,
addr2
.
objid
,
addr2
.
objsub
id
))
FROM
objects
,
pg_get_object_address
(
type
,
name
,
args
)
addr1
,
pg_identify_object_as_address
(
classid
,
objid
,
subobj
id
)
ioa
(
typ
,
nms
,
args
),
pg_identify_object_as_address
(
classid
,
objid
,
objsub
id
)
ioa
(
typ
,
nms
,
args
),
pg_get_object_address
(
typ
,
nms
,
ioa
.
args
)
as
addr2
ORDER
BY
addr1
.
classid
,
addr1
.
objid
,
addr1
.
subobj
id
;
ORDER
BY
addr1
.
classid
,
addr1
.
objid
,
addr1
.
objsub
id
;
---
--- Cleanup resources
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment