Обсуждение: pgsql: Fix DROP OWNED BY to correctly consider the implicitly-deleted

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

pgsql: Fix DROP OWNED BY to correctly consider the implicitly-deleted

От
alvherre@postgresql.org (Alvaro Herrera)
Дата:
Log Message:
-----------
Fix DROP OWNED BY to correctly consider the implicitly-deleted objects list for
each object to be deleted, instead of the previous hack that just skipped
INTERNAL dependencies, which didn't really work.  Per report from Tom Lane.

To do this, introduce a new performMultipleDeletions entry point in
dependency.c to delete multiple objects at once.  The dependency code then has
the responsability of tracking INTERNAL and AUTO dependencies as needed.

Along the way, change ObjectAddresses so that we can allocate an ObjectAddress
list from outside dependency.c and not have to export the internal
representation.

Modified Files:
--------------
    pgsql/src/backend/catalog:
        dependency.c (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c.diff?r1=1.58&r2=1.59)
        pg_shdepend.c (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_shdepend.c.diff?r1=1.12&r2=1.13)
    pgsql/src/include/catalog:
        dependency.h (r1.25 -> r1.26)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/dependency.h.diff?r1=1.25&r2=1.26)