Re: Requesting some information about the small portion of source code of postgreSQL - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Requesting some information about the small portion of source code of postgreSQL
Date
Msg-id CAMsr+YGnt88v6RaWayaHw2Fqoy=XYiZLfVJmRHGEO=KHEDMmOQ@mail.gmail.com
Whole thread Raw
In response to Requesting some information about the small portion of source code of postgreSQL  (Srinivas Karthik V <skarthikv.iitb@gmail.com>)
List pgsql-hackers
On 27 September 2016 at 14:13, Srinivas Karthik V
<skarthikv.iitb@gmail.com> wrote:
> Dear PostgresSQL Hackers,
>    I am working in optimizer module of postgreSQL 9.4.1.

Why would you target a severely obsolete patch release?

> Also I would like to know for what targetlist stands for.

Can't really comment on the rest, but the targetlist is what gets
projected. It is the query or subquery output. It also contains a
bunch of internal-use values that get discarded and are not returned
to the user; these are labeled "resjunk".

e.g. in

SELECT a, b, f(b,c) / 100, 'x'
FROM some_table;

the targetlist is 4 entries. Two simple column references to "a" and
"b". An expression for f(b,c)/100 containing the column-references for
"b" and "c" and various surrounding expression nodes. Finally a
literal entry for 'x'.

You'll find turning on the various debug print options for parsetrees,
rewriter output and plan trees helpful in understanding what's going
on.



-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Remove superuser() checks from pgstattuple
Next
From: Michael Paquier
Date:
Subject: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress