Re: Patch: to pass query string to pg_plan_query() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: to pass query string to pg_plan_query()
Date
Msg-id 14854.1585237484@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: to pass query string to pg_plan_query()  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Patch: to pass query string to pg_plan_query()  (Julien Rouhaud <rjuju123@gmail.com>)
Re: Patch: to pass query string to pg_plan_query()  (legrand legrand <legrand_legrand@hotmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@oss.nttdata.com> writes:
> Does anyone object to this patch? I'm thinking to commit it separetely
> at first before committing the planning_counter_in_pg_stat_statements
> patch.

I took a quick look through v9-0001-Pass-query-string-to-the-planner.patch
and it's fine by me.  It also matches up with something I've wanted to
do for awhile, which is to make the query string available during
planning and execution so that we can produce error cursors for
run-time errors, when relevant.

(It's a little weird that the patch doesn't make standard_planner
actually *do* anything with the string, like say save it into
the PlannerInfo struct.  But that can come later I guess.)

Note that I wouldn't want to bet that all of these call sites always have
non-null query strings to pass; but probably most of the time they will.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: backup manifests
Next
From: Konstantin Knizhnik
Date:
Subject: Re: Columns correlation and adaptive query optimization