Re: wrong hint message for ALTER FOREIGN TABLE

From: Thom Brown <thom(at)linux(dot)com>
To: Shigeru Hanada <hanada(at)metrosystems(dot)co(dot)jp>
Cc: "pgsql-hackers >> PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: wrong hint message for ALTER FOREIGN TABLE
Date: 2011-04-25 10:34:52
Message-ID: BANLkTik0bmS45NLXy9A8RKaO0E4smsCBPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25 April 2011 10:06, Shigeru Hanada <hanada(at)metrosystems(dot)co(dot)jp> wrote:
> I noticed that ALTER FOREIGN TABLE RENAME TO emits a wrong hint message if
> the object was not a foreign table.  ISTM that the hint message is not
> necessary there. Attached patch removes the hint message.
>
> Steps to reproduce the situation:
>
> postgres=# CREATE FOREIGN TABLE foo () SERVER file_server;
> postgres=# ALTER FOREIGN TABLE foo RENAME TO bar;
> ERROR:  "foo" is not a foreign table
> HINT:  Use ALTER FOREIGN TABLE instead.

Don't you mean that you created a regular table first, then tried to
rename it as a foreign table? Your example here will be successful
without the error.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2011-04-25 11:32:18 Re: wrong hint message for ALTER FOREIGN TABLE
Previous Message Shigeru Hanada 2011-04-25 09:06:21 wrong hint message for ALTER FOREIGN TABLE