what exactly is a PlaceHolderVar? - Mailing list pgsql-hackers

From Robert Haas
Subject what exactly is a PlaceHolderVar?
Date
Msg-id AANLkTinP01jOWUI2nTifW5OPqgO1Fsd27SqkjRLQ0HT0@mail.gmail.com
Whole thread Raw
Responses Re: what exactly is a PlaceHolderVar?
List pgsql-hackers
I can't find any good documentation of this in the source tree
anywhere.  placeholder.c just says:
*        PlaceHolderVar and PlaceHolderInfo manipulation routines

and placeholder.h says:
*        prototypes for optimizer/util/placeholder.c.

...which is less than informative.  The commit message that introduced
them has a few details:
   Add a concept of "placeholder" variables to the planner.  These
are variables   that represent some expression that we desire to compute below the top level   of the plan, and then
letthat value "bubble up" as though it were a plain   Var (ie, a column value).
 

...but I'm still having a hard time wrapping my head around it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: "mac_man2005@hotmail.it"
Date:
Subject: Re: About tapes
Next
From: Peter Eisentraut
Date:
Subject: Re: server authentication over Unix-domain sockets