Re: ATT_FOREIGN_TABLE and ATWrongRelkindError()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ATT_FOREIGN_TABLE and ATWrongRelkindError()
Date: 2015-10-22 21:06:37
Message-ID: CA+TgmoYxLHe2=FSno5VyOCOi3dJm7G2gArZQDr2UC-=VhS6OPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 21, 2015 at 1:51 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> This may just be nitpicking but I noticed that ATWrongRelkindError() could
> emit a better message in case of such errors during ALTER COLUMN DEFAULT
> and ALTER COLUMN SET STORAGE than "%s is of the wrong type" which is what
> it would emit now. Just need to add a couple of cases to the switch there:
>
> + case ATT_TABLE | ATT_VIEW | ATT_FOREIGN_TABLE:
> + msg = _("\"%s\" is not a table, view or foreign table");
> + break;
>
> + case ATT_TABLE | ATT_MATVIEW | ATT_FOREIGN_TABLE:
> + msg = _("\"%s\" is not a table, materialized view, or foreign table");
> + break;
>
> Attached adds those.

Good catch. Committed and back-patched to 9.5.

(Yes, one of these problems goes back to 9.3, but it's a minor issue
so I didn't bother. If someone really feels the urge, have at it.)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-10-22 21:09:08 Re: clearing opfuncid vs. parallel query
Previous Message Robert Haas 2015-10-22 20:50:12 Re: clearing opfuncid vs. parallel query