Re: Reverse Engineering - search constraints are not explicitly stated in the tables from the VIEW

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nill <nillx87(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reverse Engineering - search constraints are not explicitly stated in the tables from the VIEW
Date: 2014-11-12 21:44:14
Message-ID: 30099.1415828654@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

nill <nillx87(at)hotmail(dot)com> writes:
> I am analyzing query plans generated by the view in the database PostgreSQL
> 8.3, looking for missing information "constraints not explicitly registrants
> in the tables."

You realize of course that 8.3 is nearly 7 years old and has been out of
support for awhile.

> In the analysis of the query plan and its subplane, I can not understand
> what the parameter $0 represents, without looking the SQL query. My question
> is: looking only at the query plan product, you can understand what is the
> parameter $0?

It's a variable passed down from the outer query level. It's true that
you can't tell which variable, in 8.3. Less obsolete versions produce
more readable output though. (I won't claim it's perfect; we still don't
try very hard to decompile ANY/ALL subplans.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-11-12 21:51:12 Re: On partitioning
Previous Message Andres Freund 2014-11-12 21:39:12 Re: REINDEX CONCURRENTLY 2.0