Re: primary key error message

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: primary key error message
Дата
Msg-id 1264108950.509.8.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: primary key error message  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: primary key error message  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: primary key error message  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On tor, 2010-01-21 at 15:51 -0500, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Thu, Jan 21, 2010 at 3:30 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> >> Here is a small patch that changes the error message
> >> 
> >>  duplicate key value violates unique constraint "%s"
> >> 
> >> into
> >> 
> >>  duplicate key value violates primary key "%s"
> >> 
> >> when the constraint is in fact a primary key.
> >> 
> >> Comments?
> 
> > Why bother?  And why bother now, when we're in the middle of the last
> > CommitFest and trying to move toward a release?
> 
> This patch fails to cover all cases (index build being the obvious
> omission, but I think there might be other paths as well where the
> information is not so readily available).

This is the user-visible error message, and that's the only place it's
generated.

> And I agree with Robert that the usefulness is at best highly debatable.

The usefulness is that they are different kinds of objects that are
defined and listed in different ways and it would be slightly helpful if
the error message pointed in the righter direction.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PITR backup history files with identical 2nd part file names
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: primary key error message