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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:313:   /*semi*/final void cancelquery() {    PD("CancelRequest\n");    .pgsql_util.conxion lcon=getsocket(1);    lcon->add_int32(16)->add_int32(PG_PROTOCOL(1234,5678))    ->add_int32(backendpid)->add(cancelsecret)->sendcmd(FLUSHSEND);    lcon->close();   #ifdef PG_DEBUGMORE    PD("Closetrace %O\n",backtrace());   #endif    if(c) { -  .pgsql_util.conxion plugbuffer=c->start(1); +  .pgsql_util.conxion plugbuffer; +  if(!catch(plugbuffer=c->start(1))) {    foreach(qportals->peek_array();;int|.pgsql_util.sql_result portal)    if(objectp(portal))    portal->_closeportal(plugbuffer);    plugbuffer->sendcmd(SENDOUT);    }    } -  + }      //! Changes the connection charset. When set to @expr{"UTF8"@}, the query,   //! parameters and results can be Pike-native wide strings.   //!   //! @param charset   //! A PostgreSQL charset name.   //!   //! @seealso   //! @[get_charset()], @[create()],   //! @url{http://www.postgresql.org/search/?u=%2Fdocs%2Fcurrent%2F&q=character+sets@}
pike.git/lib/modules/Sql.pmod/pgsql.pike:1836:    paramValues=({});    if(String.width(q)>8)    ERROR("Wide string literals in %O not supported\n",q);    if(has_value(q,"\0"))    ERROR("Querystring %O contains invalid literal nul-characters\n",q);    mapping(string:mixed) tp;    int tstart;    if(!forcetext && forcecache==1    || forcecache!=0    && (sizeof(q)>=MINPREPARELENGTH || .pgsql_util.cachealways[q])) { -  object plugbuffer=c->start(); +  object plugbuffer; +  while(catch(plugbuffer=c->start())) +  reconnect();    if(tp=_prepareds[q]) {    if(tp.preparedname) {   #ifdef PG_STATS    prepstmtused++;   #endif    preparedname=tp.preparedname;    } else if((tstart=tp.trun)    && tp.tparse*FACTORPLAN>=tstart    && (undefinedp(_options.cache_autoprepared_statements)    || _options.cache_autoprepared_statements))