Re: [v9.2] DROP statement reworks

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.2] DROP statement reworks
Date: 2011-09-12 07:41:04
Message-ID: CADyhKSXpHmw4jZG0gGwfChvEtmAtxtywccixMGmMGJB+-=oK1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I updated the patches that I send a month before.

These are rebased to the latest tree, and the part-3 portion also consolidates
DROP OPERATOR FAMILY/CLASS routines that I forgot to rework in the
previous patch.

Rest of portions are not changed.

Thanks,

2011/8/15 Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>:
> The attached three patches try to consolidate code path of DROP
> statement on various kind of object classes.
>
> The first part provides a set of internal api to reference properties
> of object types; as we had a discussion before.
> It adds a big static array indexed by ObjectType; that holds OID of
> corresponding catalog, catcache id, attribute number of name,
> namespace, owner and so on. Every field of this array is accessable
> via get_object_property_*() interfaces.
> As a proof-of-concept, I reworked object_exists() with this array to
> lookup a heaptuple by the supplied ObjectAddress.
>
> The second part is a revised one from what I submitted in the commit-fest July.
> It consolidate existing code paths corresponding to DropStmt (schema,
> relations, text searches, type, domain, extension, conversion,
> collation).
>
> The third part is more reworks for other object classes (aggregate,
> function, language, foreign data wrapper, foreign server, cast,
> operator, trigger, rule).
>
> I don't touch on shared database objects (database, tablespace and
> role) because its behavior on deletion is not compatible with any
> other object classes. So, it is unclear for me whether it is a
> suitable case to be consolidated.
> And, I also don't touch code corresponding to user-mapping because it
> is not supported by get_object_address() yet.
>
> Thanks,
> --
> KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
>
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

Attachment Content-Type Size
pgsql-v9.2-drop-reworks-1.v2.patch application/octet-stream 16.7 KB
pgsql-v9.2-drop-reworks-2.v2.patch application/octet-stream 44.4 KB
pgsql-v9.2-drop-reworks-3.v2.patch application/octet-stream 59.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2011-09-12 09:12:03 Re: EXPLAIN and nfiltered, take two
Previous Message George Barnett 2011-09-12 06:46:53 Re: Patch to improve reliability of postgresql on linux nfs