Branch: Tag:


2012-04-10 13:29:38 by Stephen R. van den Berg <>

pgsql: Fix reconnect option; more efficient decoding of selectresult;
support text connection mode in queries

Text mode connection support is possible through a connection option and/or
through a query option. Turning this on will allow multiple statements
per query, but will also force communication to and from the database for
a query to be converted to text. For some queries, this is more efficient
than the binary method.

230:   private int copyinprogress;   int _fetchlimit;   int _alltext; + int _forcetext;      #ifdef NO_LOCKING   int _qmtxkey;
271:   }      void create(object pgsqlsess,string query,int fetchlimit, -  int portalbuffersize,int alltyped,array params) +  int portalbuffersize,int alltyped,array params,int forcetext)   { _pgsqlsess = pgsqlsess;    _query = query;    _datarows = ({ }); numrows = UNDEFINED;    fetchmutex = Thread.Mutex(); -  _fetchlimit=fetchlimit; +  _fetchlimit=forcetext?0:fetchlimit;    _portalbuffersize=portalbuffersize;    _alltext = !alltyped;    _params = params; -  +  _forcetext = forcetext;    steallock();   }