]> granicus.if.org Git - postgresql/commit
Change many routines to return ObjectAddress rather than OID
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 3 Mar 2015 17:10:50 +0000 (14:10 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 3 Mar 2015 17:10:50 +0000 (14:10 -0300)
commita2e35b53c39b2a27d3e332dc7c506539c306fd44
tree1f4cd33208d33f4a8b3159b0d3757109c67d4b14
parent6f9d79904748c26a58991942dc6719db558f77b0
Change many routines to return ObjectAddress rather than OID

The changed routines are mostly those that can be directly called by
ProcessUtilitySlow; the intention is to make the affected object
information more precise, in support for future event trigger changes.
Originally it was envisioned that the OID of the affected object would
be enough, and in most cases that is correct, but upon actually
implementing the event trigger changes it turned out that ObjectAddress
is more widely useful.

Additionally, some command execution routines grew an output argument
that's an object address which provides further info about the executed
command.  To wit:

* for ALTER DOMAIN / ADD CONSTRAINT, it corresponds to the address of
  the new constraint

* for ALTER OBJECT / SET SCHEMA, it corresponds to the address of the
  schema that originally contained the object.

* for ALTER EXTENSION {ADD, DROP} OBJECT, it corresponds to the address
  of the object added to or dropped from the extension.

There's no user-visible change in this commit, and no functional change
either.

Discussion: 20150218213255.GC6717@tamriel.snowman.net
Reviewed-By: Stephen Frost, Andres Freund
68 files changed:
src/backend/bootstrap/bootparse.y
src/backend/catalog/heap.c
src/backend/catalog/objectaddress.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_conversion.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_type.c
src/backend/catalog/toasting.c
src/backend/commands/aggregatecmds.c
src/backend/commands/alter.c
src/backend/commands/cluster.c
src/backend/commands/collationcmds.c
src/backend/commands/comment.c
src/backend/commands/conversioncmds.c
src/backend/commands/createas.c
src/backend/commands/dbcommands.c
src/backend/commands/event_trigger.c
src/backend/commands/extension.c
src/backend/commands/foreigncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/indexcmds.c
src/backend/commands/matview.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/policy.c
src/backend/commands/proclang.c
src/backend/commands/schemacmds.c
src/backend/commands/seclabel.c
src/backend/commands/sequence.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/trigger.c
src/backend/commands/tsearchcmds.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/commands/view.c
src/backend/rewrite/rewriteDefine.c
src/backend/tcop/utility.c
src/include/catalog/heap.h
src/include/catalog/objectaddress.h
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_conversion_fn.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_proc_fn.h
src/include/catalog/pg_type_fn.h
src/include/commands/alter.h
src/include/commands/collationcmds.h
src/include/commands/comment.h
src/include/commands/conversioncmds.h
src/include/commands/createas.h
src/include/commands/dbcommands.h
src/include/commands/defrem.h
src/include/commands/event_trigger.h
src/include/commands/extension.h
src/include/commands/matview.h
src/include/commands/policy.h
src/include/commands/proclang.h
src/include/commands/schemacmds.h
src/include/commands/seclabel.h
src/include/commands/sequence.h
src/include/commands/tablecmds.h
src/include/commands/tablespace.h
src/include/commands/trigger.h
src/include/commands/typecmds.h
src/include/commands/user.h
src/include/commands/view.h
src/include/rewrite/rewriteDefine.h