On Mon, Apr 25, 2011 at 10:17 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Shigeru Hanada <han...@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 foreign table",
!                                               
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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to