pike.git / lib / modules / Sql.pmod / pgsql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:60:       /* Statements matching transendprefix will cause the driver    * 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]|$)");       /* For statements matching execfetchlimit the resultrows will not be -  * fetched in pieces +  * 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)\a|\aLIMIT\a+[1-9][; \t\f\r\n]*$");      private Regexp iregexp(string expr) {    Stdio.Buffer ret=Stdio.Buffer();    foreach(expr;;int c)    if(c>='A'&&c<='Z')    ret->add('[',c,c+'a'-'A',']');    else if(c=='\a') // Replace with generic whitespace