Gregory Stark wrote:
> Then you would be going very much against the user's expectations.
> Driver interfaces expose very clearly to the user an explicit
> interface to prepare and execute a query separately. What your
> proposing is to go behind the user's back and do what he's gone out
> of his way to tell you not to do. You can always choose to prepare
> your queries immediately before use. Most drivers even supply an
> interface to do so in a single step for convenience.
Let's verify that. JDBC and PL/pgSQL have been mentioned.
The JDBC documentation merely contains statements of the sort "A SQL
statement with or without IN parameters can be pre-compiled and stored
in a PreparedStatement object. This object can then be used to
efficiently execute this statement multiple times." There is
absolutely no indication that the execution plan of the statement is
computed at the time of preparation. In fact, it doesn't say
what "pre-compiled" means at all.
For PL/pgSQL, you simply write a query and all the preparing action
happens implicitly. There is nothing explicit about that interface.
So if users have certain expectations here, they're just making them up.
In response to
pgsql-hackers by date
|Next:||From: Martijn van Oosterhout||Date: 2006-08-31 18:08:40|
|Subject: Re: Prepared statements considered harmful|
|Previous:||From: Tom Lane||Date: 2006-08-31 17:50:50|
|Subject: Re: [COMMITTERS] pgsql: Second try committing the path changes. |