On 15 January 2012 11:41, Daniel Farina <daniel@heroku.com> wrote:
> I've *finally* gotten around to reviewing this patch.
>
> My first step was to de-bitrot it very slightly. More on that in a moment.
Thanks.
> Prepared statements are less informative, unless one knows their
> naming convention:
>
> query | execute foo;
>
> I don't know what JDBC users or ActiveRecord 3 users are going to
> think about that. However, just about everyone else will be happy.
I should point out, though I think you might be aware of this already,
that the patch actually behaves in the same way as the existing
implementation here. It will only normalise prepared queries that are
prepared with PQprepare() or its underlying wire-protocol facility. If
you run the example in the pg_stat_statements docs, where pgbench is
passed "-M prepared", that will work just as well as before. Perhaps
it's something that the patch should be able to do. That said, it
seems pretty likely that client libraries won't be dynamically
generating SQL Prepare/Execute statements under the hood.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services