Tom Lane wrote:
> In practice, any given application will probably use one method to the
> exclusion of the other, and wouldn't notice the "inconsistency" anyway.
> If you are using both methods of preparing statements for some reason,
> it's not improbable that you would want to know which way a given
> statement was created, and seeing the PREPARE in there would be a useful
> cue.
The "from_sql" field of the view is an infinitely better way to
determine the source of the prepared statement.
Anyway, if there was a reasonably cheap way to present the query strings
of protocol-level and SQL prepared statements in the same manner, I
think we should definitely do so. Since there doesn't appear to be one,
I'm content to just use the query string as sent by the user. I'll post
a revised patch that does that soon.
-Neil