Re: wrong hint message for ALTER FOREIGN TABLE

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: wrong hint message for ALTER FOREIGN TABLE
Дата
Msg-id BANLkTikscsGCR1RdiF=WU7NCMOFtUDVPkQ@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 7:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> The sequence of steps that he posted wasn't actually right.
>
> Yes, I did read the thread.

OK.

>> 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.")));
>
> Well, it's a pretty obvious global-search-and-replace error, but I fail
> to see the advantage of just deleting the hint.  I was thinking
>
> -                        errhint("Use ALTER FOREIGN TABLE instead.")));
> +                        errhint("Use ALTER TABLE instead.")));
>
> As per the other thread today, this advice would usually be correct,
> so I think that not offering any advice at all would be a step down from
> that.

Well, currently ALTER TABLE will work even if the argument is a view
or sequence, but I view that as a backwards-compatibility kludge we
should be looking to move away from, not something we want to further
bake in.  However, I'm out of time to bikeshed on this issue, so fix
it however you like.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Unfriendly handling of pg_hba SSL options with SSL off
Следующее
От: Robert Haas
Дата:
Сообщение: Re: getting to beta