Re: ATT_FOREIGN_TABLE and ATWrongRelkindError() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ATT_FOREIGN_TABLE and ATWrongRelkindError()
Date
Msg-id CA+TgmoYxLHe2=FSno5VyOCOi3dJm7G2gArZQDr2UC-=VhS6OPg@mail.gmail.com
Whole thread Raw
In response to ATT_FOREIGN_TABLE and ATWrongRelkindError()  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: ATT_FOREIGN_TABLE and ATWrongRelkindError()  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Re: ATT_FOREIGN_TABLE and ATWrongRelkindError()  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
On Wed, Oct 21, 2015 at 1:51 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: clearing opfuncid vs. parallel query
Next
From: Tom Lane
Date:
Subject: Re: clearing opfuncid vs. parallel query