pike.git/
lib/
modules/
Sql.pmod/
pgsql.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2008-08-20
2008-08-20 19:25:24 by Stephen R. van den Berg <srb@cuci.nl>
d6f86e6058e73438bb9bdca7c56b6e8e9e6f0d5f (
23
lines) (+
23
/-
0
)
[
Show
|
Annotate
]
Branch:
7.9
pgsql support set/get charset
Rev: lib/modules/Sql.pmod/pgsql.pike:1.28
299:
} }
+
//! 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.