pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Refactor ObjectAddress field assignments for type dependencies
2+ messages / 1 participants
[nested] [flat]

* pgsql: Refactor ObjectAddress field assignments for type dependencies
@ 2020-06-29 00:58 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2020-06-29 00:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Refactor ObjectAddress field assignments for type dependencies

The logic used to build the set of dependencies needed for a type is
rather repetitive with direct assignments for each ObjectAddress field.
This refactors the code to use the macro ObjectAddressSet() instead, to
do the same work.  There are more areas of the backend code that could
use this macro, but these are left for a follow-up patch that will
partially rework the way dependencies are recorded as well.  Type
dependencies are left out of the follow-up patch, so they are refactored
separately here.

Extracted from a larger patch by the same author.

Author: Daniel Gustafsson
Discussion: https://potgr.es/m/20190213182737.mxn6hkdxwrzgxk35@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/68de1440c79d75e529ff8c7395d698252370f992

Modified Files
--------------
src/backend/catalog/pg_type.c | 53 ++++++++++++-------------------------------
1 file changed, 14 insertions(+), 39 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Refactor ObjectAddress field assignments in more places
@ 2020-07-01 08:14 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2020-07-01 08:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Refactor ObjectAddress field assignments in more places

This is a follow-up commit similar to 68de144, with more places in the
backend code simplified with the macros able to assign values to the
fields of ObjectAddress.  The code paths changed here could be
transitioned later into using more grouping when inserting dependency
records, simplifying this future work.

Author: Daniel Gustafsson, Michael Paquier
Discussion: https://postgr.es/m/20190213182737.mxn6hkdxwrzgxk35@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4315e8c23b9a897e12fcf91de7bfd734621096bf

Modified Files
--------------
src/backend/catalog/heap.c          | 12 +++---------
src/backend/catalog/index.c         | 39 +++++++++++--------------------------
src/backend/catalog/pg_aggregate.c  | 36 +++++++++-------------------------
src/backend/catalog/pg_constraint.c | 36 ++++++++++------------------------
src/backend/catalog/pg_operator.c   | 32 ++++++++----------------------
src/backend/catalog/pg_proc.c       | 32 ++++++++----------------------
6 files changed, 49 insertions(+), 138 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-07-01 08:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 00:58 pgsql: Refactor ObjectAddress field assignments for type dependencies Michael Paquier <michael@paquier.xyz>
2020-07-01 08:14 pgsql: Refactor ObjectAddress field assignments in more places Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox