On Mon, Aug 2, 2010 at 9:20 AM, Yeb Havinga <yebhavi...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers