pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql_util.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:102:
*/ private Regexp dontcacheprefix = iregexp("^\a*(FETCH|COPY)\a"); /* Statements not matching paralleliseprefix will cause the driver * to stall submission until all previously started statements have * run to completion */ private Regexp paralleliseprefix = iregexp("^\a*((SELEC|INSER)T|(UPDA|DELE)TE|(FETC|WIT)H)\a");
-
/* Statements matching transbeginprefix will cause the driver
+
/* Statements matching transbeginprefix will cause the driver
to
* insert a sync after the statement. * Failure to do so, will result in portal synchronisation errors * in the event of an ErrorResponse. */ final Regexp transbeginprefix = iregexp("^\a*(BEGIN|START)([; \t\f\r\n]|$)");
-
/* Statements matching transendprefix will cause the driver
+
/* Statements matching transendprefix will cause the driver
to
* insert a sync after the statement. * Failure to do so, will result in portal synchronisation errors * in the event of an ErrorResponse. */ final Regexp transendprefix = iregexp("^\a*(COMMIT|ROLLBACK|END)([; \t\f\r\n]|$)");
-
+
/* Statements matching nodataresprefix will cause the driver
+
* to skip asking for a query description and query results, since there
+
* are no arguments or results to begin with.
+
*/
+
final Regexp nodataresprefix
+
= iregexp("^\a*(RESET|CLOSE|DISCARD)\a");
+
/* For statements matching execfetchlimit the resultrows will not be * fetched in pieces. This heuristic will be sub-optimal whenever * either an UPDATE/DELETE/INSERT statement is prefixed by WITH, or * if there is a RETURNING with a *lot* of results. In those cases * the portal will be busy until all results have been fetched, and will * not be able to deliver results belonging to other parallel queries * running on the same filedescriptor. * * However, considering that the current heuristic increases query-speed * in the majority of the real-world cases, it would be considered a good * tradeoff. */ private Regexp execfetchlimit
-
= iregexp("^\a*((UPDA|DELE)TE|INSERT"
+
= iregexp("^\a*((UPDA|DELE)TE|INSERT
|CREATE|DROP
"
"|RESET|CLOSE|DISCARD)\a|\aLIMIT\a+[1-9][; \t\f\r\n]*$"); private void default_backend_runs() { // Runs as soon as the cb_backend = Pike.DefaultBackend; // DefaultBackend has started } private void create() { atexit(destroy); // Run callbacks from our local_backend until DefaultBackend has started cb_backend = local_backend = Pike.SmallBackend();