Re: patch for check constraints using multiple inheritance

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: patch for check constraints using multiple inheritance
Дата
Msg-id AANLkTinNPYZLxG07MvuCrbJ=J5eT0pFmCv4p4X-Q3XK5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch for check constraints using multiple inheritance  (Yeb Havinga <yebhavinga@gmail.com>)
Ответы Re: patch for check constraints using multiple inheritance  (Yeb Havinga <yebhavinga@gmail.com>)
Список pgsql-hackers
On Mon, Aug 2, 2010 at 9:20 AM, Yeb Havinga <yebhavinga@gmail.com> wrote:
> Robert Haas wrote:
>>
>> I agree that's the crux of the problem, but I can't see solving it
>> with a global variable.  I realize you were just testing...
>
> Yes it was just a test. However, somewhere information must be kept or
> altered so it can be detected that a relation has already been visited, i.e.
> it is a multiple inheriting child. The other solutions I could think of are
> more intrusive (i.e. definitionin ATController and passing as parameter).
>
> The attached patch uses the globally defined list. After ATPrepCmd the list
> pointer is reset to NIL, the list not freed since the allocs are done in a
> memory context soon to be deleted (PortalHeapMemory). It passes regression
> as well as the script below.

I can't speak for any other committer, but personally I'm prepared to
reject out of hand any solution involving a global variable.  This
code is none to easy to follow as it is and adding global variables to
the mix is not going to make it better, even if we can convince
ourselves that it's safe and correct.  This is something of a corner
case, so I won't be crushed if a cleaner fix is too invasive to
back-patch.  Incidentally, we need to shift this discussion to a new
subject line; we have a working patch for the original subject of this
thread, and are now discussing the related problem I found with
attributes.

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: english parser in text search: support for multiple words in the same position
Следующее
От: Sushant Sinha
Дата:
Сообщение: Re: english parser in text search: support for multiple words in the same position