From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Walter Cai <wzcai92(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: |
Date: | 2018-01-09 19:14:07 |
Message-ID: | 6499.1515525247@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Walter Cai <wzcai92(at)gmail(dot)com> writes:
> I (a graduate student) am currently trying to modify a postgres instance
> slightly to incorporate my modified cardinality estimates. In order to run
> these experiments I'm hoping to access the raw values for selections
> predicates from within the calc_joinrel_size_estimate method (in costsize.c).
> For example, if the restriction
> WHERE name_attr = "example_str"
> appears in the query, I'd like to get the "name_attr" and "example_str"
> values. If possible, I would very much appreciate the help.
It's pretty unclear what you mean by "raw values". What you're actually
going to be dealing with in that part of the code is a List of
RestrictInfo nodes, one for each relevant WHERE clause. The one
representing this particular clause would contain an OpExpr node
representing the "=" operator, and the two inputs of the operator
would be a Var node representing the name_attr column and a Const
representing the 'example_str' literal. You could pull the value
of the literal out of the Const node easily enough, but I don't
understand what you're looking for with respect to the Var.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2018-01-09 19:31:40 | Re: to_timestamp TZH and TZM format specifiers |
Previous Message | Gavin Flower | 2018-01-09 19:02:09 | Re: |