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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:164:   //! @param host   //! Should either contain @expr{"hostname"@} or   //! @expr{"hostname:portname"@}. This allows you to specify the TCP/IP   //! port to connect to. If the parameter is @expr{0@} or @expr{""@},   //! it will try to connect to localhost, default port.   //!   //! @param database   //! Specifies the database to connect to. Not specifying this is   //! only supported if the PostgreSQL backend has a default database   //! configured. If you do not want to connect to any live database, - //! you can use @ref{template1@}. + //! you can use @expr{"template1"@}.   //!   //! @param options   //! Currently supports at least the following:   //! @mapping   //! @member int "use_ssl"   //! If the database supports and allows SSL connections, the session   //! will be SSL encrypted, if not, the connection will fallback   //! to plain unencrypted   //! @member int "force_ssl"   //! If the database supports and allows SSL connections, the session   //! will be SSL encrypted, if not, the connection will abort   //! @member int "cache_autoprepared_statements"   //! If set to zero, it disables the automatic statement prepare and   //! cache logic; caching prepared statements can be problematic   //! when stored procedures and tables are redefined which leave stale   //! references in the already cached prepared statements   //! @member string "client_encoding"   //! Character encoding for the client side, it defaults to using   //! the default encoding specified by the database, e.g. - //! @ref{UTF8@} or @ref{SQL_ASCII@}. + //! @expr{"UTF8"@} or @expr{"SQL_ASCII"@}.   //! @member string "standard_conforming_strings"   //! When on, backslashes in strings must not be escaped any longer,   //! @[quote()] automatically adjusts quoting strategy accordingly   //! @member string "escape_string_warning"   //! When on, a warning is issued if a backslash (\) appears in an - //! ordinary string literal and @[standard_conforming_strings] is off, - //! defaults to on + //! ordinary string literal and @expr{"standard_conforming_strings"@} + //! is off, defaults to on.   //! @endmapping   //! For the numerous other options please check the PostgreSQL manual.   //!   //! @note   //! 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.   //!
pike.git/lib/modules/Sql.pmod/pgsql.pike:316:    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. When set to @ref{UTF8@}, the query, + //! Changes the connection charset. When set to @expr{"UTF8"@}, the query,   //! parameters and results can be Pike-native wide strings.   //!   //! @param charset   //! A PostgreSQL charset name.   //!   //! @seealso   //! @[get_charset()], @[create()],   //! @url{http://search.postgresql.org/search?u=%2Fdocs%2F&q=character+sets@}   void set_charset(string charset)   { big_query(sprintf("SET CLIENT_ENCODING TO '%s'",quote(charset)));
pike.git/lib/modules/Sql.pmod/pgsql.pike:341:   //!   //! @seealso   //! @[set_charset()], @[getruntimeparameters()],   //! @url{http://search.postgresql.org/search?u=%2Fdocs%2F&q=character+sets@}   string get_charset()   { return _runtimeparameter[CLIENT_ENCODING];   }      //! @returns   //! Currently active runtimeparameters for - //! the open session; these are initialised by the @ref{options@} parameter + //! the open session; these are initialised by the @tt{options@} parameter   //! during session creation, and then processed and returned by the server.   //! Common values are:   //! @mapping   //! @member string "client_encoding"   //! Character encoding for the client side, e.g. - //! @ref{UTF8@} or @ref{SQL_ASCII@}. + //! @expr{"UTF8"@} or @expr{"SQL_ASCII"@}.   //! @member string "server_encoding"   //! Character encoding for the server side as determined when the - //! database was created, e.g. @ref{UTF8@} or @ref{SQL_ASCII@} + //! database was created, e.g. @expr{"UTF8"@} or @expr{"SQL_ASCII"@}   //! @member string "DateStyle" - //! Date parsing/display, e.g. @ref{ISO, DMY@} + //! Date parsing/display, e.g. @expr{"ISO, DMY"@}   //! @member string "TimeZone" - //! Default timezone used by the database, e.g. @ref{localtime@} + //! Default timezone used by the database, e.g. @expr{"localtime"@}   //! @member string "standard_conforming_strings"   //! When on, backslashes in strings must not be escaped any longer   //! @member string "session_authorization"   //! Displays the authorisationrole which the current session runs under   //! @member string "is_superuser"   //! Indicates if the current authorisationrole has database-superuser   //! privileges   //! @member string "integer_datetimes"   //! Reports wether the database supports 64-bit-integer dates and times   //! @member string "server_version" - //! Shows the server version, e.g. @ref{8.3.3@} + //! Shows the server version, e.g. @expr{"8.3.3"@}   //! @endmapping   //!   //! The values can be changed during a session using SET commands to the   //! database.   //! For other runtimeparameters check the PostgreSQL documentation.   //!   //! @seealso   //! @url{http://search.postgresql.org/search?u=%2Fdocs%2F&q=client+connection+defaults@}   //!   //! @note
pike.git/lib/modules/Sql.pmod/pgsql.pike:1181:   }      //! With PostgreSQL you can LISTEN to NOTIFY events.   //! This function allows you to detect and handle such events.   //!   //! @param condition   //! Name of the notification event we're listening   //! to. A special case is the empty string, which matches all events,   //! and can be used as fallback function which is called only when the   //! specific condition is not handled. Another special case is - //! @ref{_reconnect@} which gets called whenever the connection unexpectedly - //! drops and reconnects to the database. + //! @expr{"_reconnect"@} which gets called whenever the connection + //! unexpectedly drops and reconnects to the database.   //!   //! @param notify_cb   //! Function to be called on receiving a notification-event of   //! condition @ref{condition@}.   //! The callback function is invoked with   //! @expr{void notify_cb(pid,condition,extrainfo, .. args);@} - //! @ref{pid@} is the process id of the database session that originated - //! the event. @ref{condition@} contains the current condition. - //! @ref{extrainfo@} contains optional extra information specified by + //! @tt{pid@} is the process id of the database session that originated + //! the event. @tt{condition@} contains the current condition. + //! @tt{extrainfo@} contains optional extra information specified by   //! the database.   //! The rest of the arguments to @ref{notify_cb@} are passed   //! verbatim from @ref{args@}.   //! The callback function must return no value.   //!   //! @param selfnotify   //! Normally notify events generated by your own session are ignored.   //! If you want to receive those as well, set @ref{selfnotify@} to one.   //!   //! @param args
pike.git/lib/modules/Sql.pmod/pgsql.pike:1280:   //!   //! @seealso   //! @[drop_db()]   void create_db(string db)   { big_query("CREATE DATABASE :db",([":db":db]));   }      //! This function destroys a database and all the data it contains (assuming   //! we have sufficient privileges to do so). It is not possible to delete   //! the database you're currently connected to. You can connect to database - //! @ref{template1@} to avoid connecting to any live database. + //! @expr{"template1"@} to avoid connecting to any live database.   //!   //! @param db   //! Name of the database to be deleted.   //!   //! @seealso   //! @[create_db()]   void drop_db(string db)   { big_query("DROP DATABASE :db",([":db":db]));   }