Re: Requesting some information about the small portion of source code of postgreSQL

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Srinivas Karthik V <skarthikv(dot)iitb(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, davinder(at)dsl(dot)serc(dot)iisc(dot)ernet(dot)in
Subject: Re: Requesting some information about the small portion of source code of postgreSQL
Date: 2016-09-27 06:28:56
Message-ID: CAMsr+YGnt88v6RaWayaHw2Fqoy=XYiZLfVJmRHGEO=KHEDMmOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 September 2016 at 14:13, Srinivas Karthik V
<skarthikv(dot)iitb(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-09-27 06:38:59 Re: Fix checkpoint skip logic on idle systems by tracking LSN progress
Previous Message Michael Paquier 2016-09-27 06:27:42 Re: Remove superuser() checks from pgstattuple