Re: and it's not a bunny rabbit, either

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: and it's not a bunny rabbit, either
Дата
Msg-id AANLkTi=+C3Lgm_SG0zqHdvqEGg+W3G4h8Ohrbdvippyr@mail.gmail.com
обсуждение исходный текст
Ответ на Re: and it's not a bunny rabbit, either  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: and it's not a bunny rabbit, either  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: and it's not a bunny rabbit, either  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Fri, Dec 31, 2010 at 8:48 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On tor, 2010-12-30 at 11:03 -0500, Robert Haas wrote:
>> No, quite the opposite.  With the other approach, you needed:
>>
>> constraints cannot be used on views
>> constraints cannot be used on composite types
>> constraints cannot be used on TOAST tables
>> constraints cannot be used on indexes
>> constraints cannot be used on foreign tables
>>
>> With this, you just need:
>>
>> constraints can only be used on tables
>
> At the beginning of this thread you said that the error messages should
> focus on what you tried to do, not what you could do instead.

Yeah, and I still believe that.  I'm having difficulty coming up with
a workable approach, though.  It would be simple enough if we could
write:

/* translator: first %s is a feature, second %s is a relation type */
%s cannot be used on %s

...but I think this is likely to cause some translation headaches.

> Also, in this particular case, the user could very well assume that a
> TOAST table or a foreign table is a table.

There's a limited amount we can do about confused users, but it is
true that the negative phrasing is better for that case.

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


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: estimating # of distinct values
Следующее
От: Joel Jacobson
Дата:
Сообщение: Re: contrib/snapshot