Re: Proposal to add --single-row to psql

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Proposal to add --single-row to psql
Дата
Msg-id CAM3SWZRP2r7yMF__kiPuC-rmTfVTAq1jiVWQu_weyKwt44uy1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal to add --single-row to psql  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
On Sun, May 12, 2013 at 1:18 PM, Jim Nasby <jim@nasby.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: Add more regression tests for dbcommands
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Logging of PAM Authentication Failure