[v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

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: [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address
Date: 2011-06-14 12:06:33
Message-ID: BANLkTikDkFfdP+DdE=+a+kHcPfPHvpDJXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The attached patch is a preparation to rework implementation of DROP statement
using a common code. That intends to apply get_object_address() to resolve name
of objects to be removed, and eventually minimizes the number of places to put
permission checks.

Its first step is an enhancement of get_object_address; to accept 'missing_ok'
argument to handle cases when IF EXISTS clause is supplied.
If 'missing_ok' was true and the supplied name was not found, the patched
get_object_address() returns an ObjectAddress with InvalidOid as objectId.
If 'missing_ok' was false, its behavior is not changed.

Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

Attachment Content-Type Size
pgsql-v9.2-drop-reworks-part-0.1.patch application/octet-stream 25.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-14 12:08:22 Re: pg_trgm: unicode string not working
Previous Message Robert Haas 2011-06-14 12:02:57 Re: 9.1 beta1 error