pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql.pike:185:
//! You need to have a database selected before using the sql-object, //! otherwise you'll get exceptions when you try to query it. Also //! notice that this function @b{can@} raise exceptions if the db //! server doesn't respond, if the database doesn't exist or is not //! accessible by you. //! //! @seealso //! @[Postgres.postgres], @[Sql.Sql], @[postgres->select_db] protected void create(void|string _host, void|string _database, void|string _user, void|string _pass, void|mapping(string:mixed) _options) {
-
pass = _pass; _pass = "CENSORED"; String.secure(pass);
+
pass = _pass; _pass = "CENSORED";
+
if(pass)
+
String.secure(pass);
user = _user; database = _database; host = _host || PGSQL_DEFAULT_HOST; options = _options || ([]); if(search(host,":")>=0 && sscanf(_host,"%s:%d",host,port)!=2) ERROR("Error in parsing the hostname argument\n"); if(!port) port = PGSQL_DEFAULT_PORT; _querymutex=Thread.Mutex(); _stealmutex=Thread.Mutex(); reconnect(); }