Subject: | [DBD::Pg] statement without any arguments is not prepared on server side |
Date: | Fri, 24 Jul 2009 12:05:46 +0200 |
To: | bug-DBD-Pg [...] rt.cpan.org |
From: | Gerhard Heift <cpan-20090118-7280 [...] gheift.de> |
Hello,
if I have a select statement without argument, which i call often, it is
not prepared on the server side.
In the dbdimp.c it is written as a comment:
/* We use the new server_side prepare style if:
1. The statement is DML
2. The attribute "pg_direct" is false
3. The attribute "pg_server_prepare" is not 0
4. There is one or more placeholders (but "onetime" has not been set)
5. There are no DEFAULT or CURRENT values
6a. The attribute "pg_server_prepare" is 1
OR
6b. All placeholders are bound (and "pg_server_prepare" is 2)
*/
But why is preparing on the serverside disabled if there is no placeholder?
I did not found anything about this limitation in the documentation [1].
Regards,
Gerhard
[1] http://www.postgresql.org/docs/8.0/static/libpq-exec.html#AEN23200
Message body not shown because it is not plain text.