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:198:
//! 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 to you. //! //! @seealso //! @[Postgres.postgres], @[Sql.Sql], @[select_db()], //! @url{http://www.postgresql.org/search/?u=%2Fdocs%2Fcurrent%2F&q=client+connection+search_path@} protected void create(void|string host, void|string database, void|string user, void|string pass, void|mapping(string:mixed) options) {
-
this::pass = Standards.IDNA.to_ascii(pass);
+
this::pass =
pass && pass != "" ?
Standards.IDNA.to_ascii(pass)
: pass
;
if(pass) { String.secure(pass); pass = "CENSORED"; }
-
this::user = Standards.IDNA.to_ascii(user, 1);
+
this::user =
user && user != "" ?
Standards.IDNA.to_ascii(user, 1)
: user
;
this::database = database; _options = options || ([]); if(!host) host = PGSQL_DEFAULT_HOST; if(has_value(host,":") && sscanf(host,"%s:%d",host,_port)!=2) ERROR("Error in parsing the hostname argument\n"); this::_host = host; if(!_port) _port = PGSQL_DEFAULT_PORT;