Re: wrong hint message for ALTER FOREIGN TABLE - Mailing list pgsql-hackers

From Robert Haas
Subject Re: wrong hint message for ALTER FOREIGN TABLE
Date
Msg-id BANLkTim5h2CRCvDeQMohxKiX3fLrcgAFRw@mail.gmail.com
Whole thread Raw
In response to Re: wrong hint message for ALTER FOREIGN TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: wrong hint message for ALTER FOREIGN TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Apr 25, 2011 at 10:17 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Shigeru Hanada <hanada@metrosystems.co.jp> writes:
>> 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.
>
> Surely it would be better to make the hint correct (ie, "Use ALTER TABLE")
> rather than just nuke it?

The sequence of steps that he posted wasn't actually right.  See
subsequent emails on the thread.  The patch seems trivially correct,
since this is obviously schizophrenic:
         ereport(ERROR,                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),                  errmsg("\"%s\" is not a
foreigntable", 
!                         RelationGetRelationName(targetrelation)),
!                  errhint("Use ALTER FOREIGN TABLE instead.")));

It's not a... so I should use a... erp.

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


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: branching for 9.2devel
Next
From: Peter Eisentraut
Date:
Subject: Re: Unfriendly handling of pg_hba SSL options with SSL off