Re: Minor inheritance/check bug: Inconsistent behavior

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Minor inheritance/check bug: Inconsistent behavior
Дата
Msg-id CAA4eK1+7A1FEY3NhhUxTPuY++fYpGcVgR0-tHBj3=vTZZatwog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Minor inheritance/check bug: Inconsistent behavior  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Sep 20, 2013 at 7:17 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Sep 20, 2013 at 9:43 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>    Handling for OID is not clear, shall we allow it or not in check constraint?
>>    In my current patch OID will not be allowed in check constraint.
>
> I vote for allowing it.

I had tried to allow for OID case, but setting OID in case of UPDATE
operation is bit tricky.
In ExecUpdate(), we need to set OID in new tuple by getting it from
old tuple, but we only have old tupleid in this function. Using old
tupleid, I can get tuple and then fetch OID from it to set in new
tuple as is done in heap_update(), but it seems bit more work and also
same has to be done in heap_update anyway unless we change signature
of heap_update().
For now, I had updated the patch for below points:
a.  to set tableoid in Copy case
b.  to set tableoid in Alter case
c.  update the docs for Create Table Page. The other places like Alter
Table and Constraints page doesn't have any information related to
what is not allowed in
     check constraints, so I left them as is.

I have not added new tests for Alter/Copy as they will test what
testcase for insert will test. However if you feel we should add test
for Alter/Copy/Update operation, then I will update the patch.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: pgbench progress report improvements
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench progress report improvements