Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 005638e

Browse files
committed
Fix naming inconsistency
subobjid -> objsubid From: Jim Nasby <Jim.Nasby@BlueTreble.com>
1 parent 20f6d74 commit 005638e

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,7 +3468,7 @@ pg_describe_object(PG_FUNCTION_ARGS)
34683468
{
34693469
Oid classid = PG_GETARG_OID(0);
34703470
Oid objid = PG_GETARG_OID(1);
3471-
int32 subobjid = PG_GETARG_INT32(2);
3471+
int32 objsubid = PG_GETARG_INT32(2);
34723472
char *description;
34733473
ObjectAddress address;
34743474

@@ -3478,7 +3478,7 @@ pg_describe_object(PG_FUNCTION_ARGS)
34783478

34793479
address.classId = classid;
34803480
address.objectId = objid;
3481-
address.objectSubId = subobjid;
3481+
address.objectSubId = objsubid;
34823482

34833483
description = getObjectDescription(&address);
34843484
PG_RETURN_TEXT_P(cstring_to_text(description));
@@ -3492,7 +3492,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
34923492
{
34933493
Oid classid = PG_GETARG_OID(0);
34943494
Oid objid = PG_GETARG_OID(1);
3495-
int32 subobjid = PG_GETARG_INT32(2);
3495+
int32 objsubid = PG_GETARG_INT32(2);
34963496
Oid schema_oid = InvalidOid;
34973497
const char *objname = NULL;
34983498
ObjectAddress address;
@@ -3503,7 +3503,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
35033503

35043504
address.classId = classid;
35053505
address.objectId = objid;
3506-
address.objectSubId = subobjid;
3506+
address.objectSubId = objsubid;
35073507

35083508
/*
35093509
* Construct a tuple descriptor for the result row. This must match this
@@ -3608,7 +3608,7 @@ pg_identify_object_as_address(PG_FUNCTION_ARGS)
36083608
{
36093609
Oid classid = PG_GETARG_OID(0);
36103610
Oid objid = PG_GETARG_OID(1);
3611-
int32 subobjid = PG_GETARG_INT32(2);
3611+
int32 objsubid = PG_GETARG_INT32(2);
36123612
ObjectAddress address;
36133613
char *identity;
36143614
List *names;
@@ -3620,7 +3620,7 @@ pg_identify_object_as_address(PG_FUNCTION_ARGS)
36203620

36213621
address.classId = classid;
36223622
address.objectId = objid;
3623-
address.objectSubId = subobjid;
3623+
address.objectSubId = objsubid;
36243624

36253625
/*
36263626
* Construct a tuple descriptor for the result row. This must match this

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 201702231
56+
#define CATALOG_VERSION_NO 201703011
5757

5858
#endif

src/include/catalog/pg_proc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,13 +3096,13 @@ DESCR("get transaction Id and commit timestamp of latest transaction commit");
30963096
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_ ));
30973097
DESCR("get identification of SQL object");
30983098

3099-
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,subobjid,type,schema,name,identity}" _null_ _null_ pg_identify_object _null_ _null_ _null_ ));
3099+
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,objsubid,type,schema,name,identity}" _null_ _null_ pg_identify_object _null_ _null_ _null_ ));
31003100
DESCR("get machine-parseable identification of SQL object");
31013101

3102-
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,subobjid,type,object_names,object_args}" _null_ _null_ pg_identify_object_as_address _null_ _null_ _null_ ));
3102+
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,objsubid,type,object_names,object_args}" _null_ _null_ pg_identify_object_as_address _null_ _null_ _null_ ));
31033103
DESCR("get identification of SQL object for pg_get_object_address()");
31043104

3105-
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,subobjid}" _null_ _null_ pg_get_object_address _null_ _null_ _null_ ));
3105+
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,objsubid}" _null_ _null_ pg_get_object_address _null_ _null_ _null_ ));
31063106
DESCR("get OID-based object address from name/args arrays");
31073107

31083108
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,14 @@ WITH objects (type, name, args) AS (VALUES
401401
('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
402402
('subscription', '{addr_sub}', '{}')
403403
)
404-
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)).*,
404+
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,
405405
-- test roundtrip through pg_identify_object_as_address
406-
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)) =
407-
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.subobjid))
406+
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)) =
407+
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.objsubid))
408408
FROM objects, pg_get_object_address(type, name, args) addr1,
409-
pg_identify_object_as_address(classid, objid, subobjid) ioa(typ,nms,args),
409+
pg_identify_object_as_address(classid, objid, objsubid) ioa(typ,nms,args),
410410
pg_get_object_address(typ, nms, ioa.args) as addr2
411-
ORDER BY addr1.classid, addr1.objid, addr1.subobjid;
411+
ORDER BY addr1.classid, addr1.objid, addr1.objsubid;
412412
type | schema | name | identity | ?column?
413413
---------------------------+------------+-------------------+----------------------------------------------------------------------+----------
414414
default acl | | | for role regress_addr_user in schema public on tables | t

src/test/regress/sql/object_address.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ WITH objects (type, name, args) AS (VALUES
181181
('publication relation', '{addr_nsp, gentable}', '{addr_pub}'),
182182
('subscription', '{addr_sub}', '{}')
183183
)
184-
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)).*,
184+
SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)).*,
185185
-- test roundtrip through pg_identify_object_as_address
186-
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)) =
187-
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.subobjid))
186+
ROW(pg_identify_object(addr1.classid, addr1.objid, addr1.objsubid)) =
187+
ROW(pg_identify_object(addr2.classid, addr2.objid, addr2.objsubid))
188188
FROM objects, pg_get_object_address(type, name, args) addr1,
189-
pg_identify_object_as_address(classid, objid, subobjid) ioa(typ,nms,args),
189+
pg_identify_object_as_address(classid, objid, objsubid) ioa(typ,nms,args),
190190
pg_get_object_address(typ, nms, ioa.args) as addr2
191-
ORDER BY addr1.classid, addr1.objid, addr1.subobjid;
191+
ORDER BY addr1.classid, addr1.objid, addr1.objsubid;
192192

193193
---
194194
--- Cleanup resources

0 commit comments

Comments
 (0)