Re: wrong hint message for ALTER FOREIGN TABLE

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: wrong hint message for ALTER FOREIGN TABLE
Дата
Msg-id BANLkTim5h2CRCvDeQMohxKiX3fLrcgAFRw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wrong hint message for ALTER FOREIGN TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: wrong hint message for ALTER FOREIGN TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: branching for 9.2devel
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unfriendly handling of pg_hba SSL options with SSL off