Обсуждение: pgsql: get_object_address: separate domain constraints from table const

Поиск
Список
Период
Сортировка

pgsql: get_object_address: separate domain constraints from table const

От
Alvaro Herrera
Дата:
get_object_address: separate domain constraints from table constraints

Apart from enabling comments on domain constraints, this enables a
future project to replicate object dropping to remote servers: with the
current mechanism there's no way to distinguish between the two types of
constraints, so there's no way to know what to drop.

Also added support for the domain constraint comments in psql's \dd and
pg_dump.

Catalog version bumped due to the change in ObjectType enum.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7eca575d1c28f6eee2bf4564f3d458d10c4a8f47

Modified Files
--------------
doc/src/sgml/ref/comment.sgml              |   14 ++++++++++++++
src/backend/catalog/objectaddress.c        |   26 ++++++++++++++++++++++----
src/backend/commands/alter.c               |    3 ++-
src/backend/commands/event_trigger.c       |    3 ++-
src/backend/commands/tablecmds.c           |    2 +-
src/backend/parser/gram.y                  |   18 +++++++++++++-----
src/backend/parser/parse_utilcmd.c         |    2 +-
src/backend/tcop/utility.c                 |    5 ++---
src/bin/pg_dump/pg_dump.c                  |   17 +++++++++++++++++
src/bin/psql/describe.c                    |   27 +++++++++++++++++++++++++--
src/include/nodes/parsenodes.h             |    3 ++-
src/test/regress/input/constraints.source  |   21 +++++++++++++++++++++
src/test/regress/output/constraints.source |   19 +++++++++++++++++++
13 files changed, 141 insertions(+), 19 deletions(-)


Re: pgsql: get_object_address: separate domain constraints from table const

От
Alvaro Herrera
Дата:
Alvaro Herrera wrote:
> get_object_address: separate domain constraints from table constraints
>
> Apart from enabling comments on domain constraints, this enables a
> future project to replicate object dropping to remote servers: with the
> current mechanism there's no way to distinguish between the two types of
> constraints, so there's no way to know what to drop.
>
> Also added support for the domain constraint comments in psql's \dd and
> pg_dump.
>
> Catalog version bumped due to the change in ObjectType enum.

Grrr.  I neglected to "git add" the catversion.h change :-(  Nevermind.
I'm committing another catalog-updating patch shortly.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services