From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Jim Nasby <jim(at)nasby(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Christopher Manning <c(at)christophermanning(dot)org>, fabriziomello(at)gmail(dot)com, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal to add --single-row to psql |
Date: | 2013-05-13 06:53:53 |
Message-ID: | CAM3SWZRP2r7yMF__kiPuC-rmTfVTAq1jiVWQu_weyKwt44uy1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, May 12, 2013 at 1:18 PM, Jim Nasby <jim(at)nasby(dot)net> wrote:
> FWIW, I've wanted the ability to plug into the parser not for an extension,
> but so that I could programmaticly enforce certain coding conventions.
Depending on the exact requirements, that probably wouldn't be too
difficult. It'd likely entail adding a hook for plugins to inspect raw
parse trees.
The pg_stat_statements core infrastructure changes for 9.2 added a
hook that allowed pg_stat_statements to inspect the post-parse
analysis (query) tree. That wouldn't be suitable for what you want,
though, because that tree loses many of the details that you are
likely to care about but are inconsequential to the semantics of the
query. For example, you couldn't tell from the post-parse analysis
tree if the query text was originally "select all, the, columns from
table" or "select * from table".
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2013-05-13 07:25:45 | Re: Logging of PAM Authentication Failure |
Previous Message | Fabien COELHO | 2013-05-13 05:58:08 | Re: Add more regression tests for dbcommands |