Re: update impossible, constraint prevents it but it shouldn't

Поиск
Список
Период
Сортировка
От lrotger
Тема Re: update impossible, constraint prevents it but it shouldn't
Дата
Msg-id 449FEE72.5080002@aircomp.aero
обсуждение исходный текст
Ответ на Re: update impossible, constraint prevents it but it shouldn't  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout wrote:
> On Mon, Jun 26, 2006 at 01:00:19PM +0200, lrotger wrote:
>
>>I run the following query:
>>
>>update personal set closed_date = flt_date + 20
>>from enr inner join personal p on enr.id = p.id_enr
>>where (...columns from enr, columns from personal...)
>
>
> I think your problem is that "personal" and "personal p" refer to
> different instances of the same table. Use EXPLAIN to check how many
> times "personal" appears in the resulting query.

it worked, I thought I had to specify the table being updated in the
from clause too if only to have something to join to the other table, as
it turns out, it's not necessary. I hope the manual for 8.1.x explains
this or at least gives some examples of using this nonstandard from clause.

> Oh yeah, 7.2 will eat your data eventually, you have been warned.
> Please upgrade to something newer.

I'll have to allocate some time to read changelogs before I upgrade
across major versions.

thanks a lot,
Lucia

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

Предыдущее
От: "Francesco Formenti - TVBLOB S.r.l."
Дата:
Сообщение: Re: unique attributes in profile management system
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: RAID + PostgreSQL?