Re: Minor inheritance/check bug: Inconsistent behavior

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Chris Travers'" <chris(at)metatrontech(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Minor inheritance/check bug: Inconsistent behavior
Date: 2012-08-24 14:48:09
Message-ID: 000701cd8207$7b4e1870$71ea4950$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, August 24, 2012 7:46 PM
Amit Kapila <amit(dot)kapila(at)huawei(dot)com> writes:
> From: pgsql-bugs-owner(at)postgresql(dot)org
> [mailto:pgsql-bugs-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
>>> None of the system columns are set at the time check constraints are
>>> checked.

>> Is there any problem if set tableOID before calling ExecConstarints()?

> Well, possibly we could kluge things to make that particular case work,
> but if someone expects that to be valid then why not oid, ctid, xmin,
> etc?
Initially, I thought of saying like that but the same is done in
heap_prepare_insert()
So doing it 2 times doesn't make sense and if we move them out then all
places from
where heap_insert gets called, we have to do it like that. However why I
have asked to
set tableOID, as for it, already functions CopyFrom and AtRewriteTable
does it(set
tableOid before Constraints check).

> And more to the point, what's the value of examining tableoid in
> a check constraint? The constraint is attached to a particular table,
> so the tableoid would be a constant for it anyway.
Here what you are suggesting if I understood correctly is while defining
such
constraints make sure its not allowed, because once defined, during
execution we might
not be able to identify. Please correct me if I have misunderstood?

With Regards,
Amit Kapila.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message ovadyaj 2012-08-24 19:59:59 BUG #7505: Backslash escaping not necessary
Previous Message Tom Lane 2012-08-24 14:38:27 Re: Minor inheritance/check bug: Inconsistent behavior