Hi all,

I have a question.
As far as I see,constraints are stored into PG database ordinarily
as follows.

  1) RelationAddRawConstraints() converts each raw constaint
      to bin form.
  2) StoreRelCheck() converts the bin form to src form and store
      them into pg_relcheck tuples.

Is pg_relcheck.rcsrc equivalent to the original raw constraint ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp

Thu, 3 Aug 2000 13:40:23 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
Raw constraint & pg_relcheck.rcsrc
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> Is pg_relcheck.rcsrc equivalent to the original raw constraint ?

To the best of deparse_expression()'s ability, it should be.
I'm not real sure why we bother to store it, rather than deparsing
rcbin on-the-fly on demand...

			regards, tom lane

Thu, 03 Aug 2000 01:07:26 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Raw constraint & pg_relcheck.rcsrc 
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > Is pg_relcheck.rcsrc equivalent to the original raw constraint ?
> 
> To the best of deparse_expression()'s ability, it should be.
> I'm not real sure why we bother to store it, rather than deparsing
> rcbin on-the-fly on demand...
>

I'm looking at DefineRelation() in commands/creartinh.c.
In case of inheritance,constraints of super classes are
stored using their pg_relcheck.rcbin-s. It seems bad 
in case of multiple inheritance.  rcsrc-s may be available
instead.

Comments ?  

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp

Thu, 3 Aug 2000 14:36:53 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
RE: Raw constraint & pg_relcheck.rcsrc 