From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: recent ALTER whatever .. SET SCHEMA refactoring |
Date: | 2013-01-07 19:14:29 |
Message-ID: | 20130107191429.GA4368@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kohei KaiGai escribió:
> Function and collation are candidates of this special case handling;
> here are just two kinds of object.
>
> Another idea is to add a function-pointer as argument of
> AlterNamespace_internal for (upcoming) object classes that takes
> special handling for detection of name collision.
> My personal preference is the later one, rather than hardwired
> special case handling.
> However, it may be too elaborate to handle just two exceptions.
I think this idea is fine. Pass a function pointer which is only
not-NULL for the two exceptional cases; the code should have an Assert
that either the function pointer is passed, or there is a nameCacheId to
use. That way, the object types we already handle in the simpler way do
not get any more complicated than they are today, and we're not forced
to create useless callbacks for objects were the lookup is trivial. The
function pointer should return boolean, true when the function/collation
is already in the given schema; that way, the message wording is only
present in AlterObjectNamespace_internal.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Fabrízio de Royes Mello | 2013-01-07 19:19:19 | Re: psql \l to accept patterns |
Previous Message | Claudio Freire | 2013-01-07 18:48:12 | Re: [PERFORM] Slow query: bitmap scan troubles |