pike.git/
lib/
modules/
Sql.pmod/
pgsql.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2015-12-09
2015-12-09 00:54:47 by Stephen R. van den Berg <srb@cuci.nl>
c395a727d6eb514ec5b408dbc628f186fc0068d9 (
17
lines) (+
11
/-
6
)
[
Show
|
Annotate
]
Branch:
8.1
pgsql: Account for serverside closed connections.
320:
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.
1843:
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