Skip site navigation (1) Skip section navigation (2)

RE: Raw constraint & pg_relcheck.rcsrc

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: Raw constraint & pg_relcheck.rcsrc
Date: 2000-08-04 02:41:21
Message-ID: 000501bffdbd$7997c8e0$2801007e@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
> -----Original Message-----
> From: Tom Lane
> 
> "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> > Is there any way to convert rcbin(cooked text format) to the
> > raw(pre-cooked) Node expression?
> 
> No.
> 
> > Or is there a way to
> > convert rcsrc to the pre-cooked Node expression ?
> > Or is there a way to convert rcsrc to the cooked expression ?
>

[snip]
 
> Another possibility is to determine the mapping from parent columns
> to child columns, and then walk through the (cooked) expression tree
> and substitute varattno field values in Var nodes accordingly.  I'm
> not certain that's sufficient, but if it is it'd be a fairly small
> amount of code (in fact you might be able to just call the routines in
> the rewriter that do similar things).
>

OK,I would try this way using expression_tree_walker() which I
used once in my trial for ALTER TABLE DROP COLUMN.

Thanks.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-08-04 06:30:21
Subject: Re: Anyone particularly wedded to func_tlist mechanism?
Previous:From: Hiroshi InoueDate: 2000-08-04 02:00:52
Subject: RE: Anyone particularly wedded to func_tlist mechanism?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group