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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:292:    object lcon;    PD("CancelRequest\n");    if(!(lcon=getsocket(1)))    ERROR("Cancel connect failed\n");    lcon.write(({_c.plugint32(16),_c.plugint32(PG_PROTOCOL(1234,5678)),    _c.plugint32(backendpid),cancelsecret}));    lcon.close();    }   }    + //! Changes the connection charset. + //! + //! @[charset] is a PostgreSQL charset name. + //! + //! @seealso + //! @[get_charset], @[create] + void set_charset(string charset) + { + #if 0 +  // FIXME Do we want to support the "unicode" setting? (see mysql.pike) + #endif +  big_query("SET CLIENT_ENCODING TO :charset",([":charset":charset])); + } +  + //! Returns the PostgreSQL name for the current connection charset. + //! + //! @seealso + //! @[set_charset], @[getruntimeparameters] + string get_charset() + { return runtimeparameter->client_encoding; + } +    //! Returns the set of currently active runtimeparameters for   //! the open session; these are initialised by the options parameter   //! during session creation, and then processed and returned by the server.   //!   //! Common values are:   //! @string   //! @value "client_encoding"   //! Character encoding for the client side, e.g.: "SQL_ASCII"   //! @value "server_encoding"   //! Character encoding for the server side as determined when the