MediaWiki  REL1_19
DatabasePostgres Class Reference
Inheritance diagram for DatabasePostgres:
Collaboration diagram for DatabasePostgres:

List of all members.

Public Member Functions

 addQuotes ($s)
 affectedRows ()
 Get the number of rows affected by the last write query.
 aggregateValue ($valuedata, $valuename= 'value')
 Return aggregated value function call.
 buildConcat ($stringList)
 Build a concatenation list to feed into a SQL query.
 cascadingDeletes ()
 Returns true if this database supports (and uses) cascading deletes.
 cleanupTriggers ()
 Returns true if this database supports (and uses) triggers (e.g.
 close ()
 Closes a database connection, if it is open Returns success, true if already closed.
 constraintExists ($table, $constraint)
 currentSequenceValue ($seqName)
 Return the current value of a sequence.
 dataSeek ($res, $row)
 Change the position of the cursor in a result object.
 decodeBlob ($b)
 Some DBMSs return a special placeholder object representing blob fields in result objects.
 duplicateTableStructure ($oldName, $newName, $temporary=false, $fname= 'DatabasePostgres::duplicateTableStructure')
 Creates a new table with structure copied from existing table Note that unlike most database abstraction functions, this function does not automatically append database prefix, because it works at a lower abstraction level.
 encodeBlob ($b)
 estimateRowCount ($table, $vars= '*', $conds='', $fname= 'DatabasePostgres::estimateRowCount', $options=array())
 Estimate rows in dataset Returns estimated count, based on EXPLAIN output This is not necessarily an accurate estimate, so use sparingly Returns -1 if count cannot be found Takes same arguments as Database::select()
 fetchObject ($res)
 Fetch the next row from the given result object, in object form.
 fetchRow ($res)
 Fetch the next row from the given result object, in associative array form.
 fieldInfo ($table, $field)
 mysql_fetch_field() wrapper Returns false if the field doesn't exist
 fieldName ($res, $n)
 Get a field name in a result object.
 fieldType ($res, $index)
 pg_field_type() wrapper
 freeResult ($res)
 Free a result object returned by query() or select().
 functionalIndexes ()
 Returns true if this database can use functional indexes.
 getDBname ()
 Get the current DB name.
 getSearchEngine ()
 Get search engine class.
 getServer ()
 Get the server hostname or IP address.
 getServerVersion ()
 getType ()
 Get the type of the DBMS, as it appears in $wgDBtype.
 hasConstraint ($name)
 implicitGroupby ()
 Returns true if this database does an implicit sort when doing GROUP BY.
 implicitOrderby ()
 Returns true if this database does an implicit order by when the column has an index For example: SELECT page_title FROM page LIMIT 1.
 indexInfo ($table, $index, $fname= 'DatabasePostgres::indexInfo')
 Returns information about an index If errors are explicitly ignored, returns NULL on failure.
 indexUnique ($table, $index, $fname= 'DatabasePostgres::indexUnique')
 insert ($table, $args, $fname= 'DatabasePostgres::insert', $options=array())
 INSERT wrapper, inserts an array into a table.
 insertId ()
 This must be called after nextSequenceVal.
 insertSelect ($destTable, $srcTable, $varMap, $conds, $fname= 'DatabasePostgres::insertSelect', $insertOptions=array(), $selectOptions=array())
 INSERT SELECT wrapper $varMap must be an associative array of the form array( 'dest1' => 'source1', ...) Source items may be literals rather then field names, but strings should be quoted with Database::addQuotes() $conds may be "*" to copy the whole table srcTable may be an array of tables.
 lastErrno ()
 Get the last error number.
 lastError ()
 Get a description of the last error.
 limitResult ($sql, $limit, $offset=false)
 Construct a LIMIT query with optional offset.
 limitResultForUpdate ($sql, $num)
 listTables ($prefix=null, $fname= 'DatabasePostgres::listTables')
 List all tables on the database.
 makeConnectionString ($vars)
 makeSelectOptions ($options)
 Various select options.
 nextSequenceValue ($seqName)
 Return the next in a sequence, save the value for retrieval via insertId()
 numFields ($res)
 Get the number of fields in a result object.
 numRows ($res)
 Get the number of rows in a result object.
 open ($server, $user, $password, $dbName)
 Usually aborts on failure.
 queryIgnore ($sql, $fname= 'DatabasePostgres::queryIgnore')
 realTableName ($name, $format= 'quoted')
 realTimestamps ()
 Returns true if this database uses timestamps rather than integers.
 relationExists ($table, $types, $schema=false)
 Query whether a given relation exists (in the given schema, or the default mw one if not given)
 roleExists ($roleName)
 Returns true if a given role (i.e.
 ruleExists ($table, $rule)
 schemaExists ($schema)
 Query whether a given schema exists.
 searchableIPs ()
 Returns true if this database can do a native search on IP columns e.g.
 selectDB ($db)
 Postgres doesn't support selectDB in the same way MySQL does.
 sequenceExists ($sequence, $schema=false)
 setFakeMaster ($enabled=true)
 Make this connection a fake master.
 streamStatementEnd (&$sql, &$newLine)
 Called by sourceStream() to check if we've reached a statement end.
 strencode ($s)
 Wrapper for addslashes()
 strictIPs ()
 Returns true if this database is strict about what can be put into an IP field.
 tableExists ($table, $fname=__METHOD__, $schema=false)
 For backward compatibility, this function checks both tables and views.
 tableName ($name, $format= 'quoted')
 Format a table name ready for use in constructing an SQL query.
 textFieldSize ($table, $field)
 Returns the size of a text field, or -1 for "unlimited".
 timestamp ($ts=0)
 Convert a timestamp in one of the formats accepted by wfTimestamp() to the format used for inserting into timestamp fields in this DBMS.
 triggerExists ($table, $trigger)
 wasDeadlock ()
 Determines if the last failure was due to a deadlock STUB.

Static Public Member Functions

static getSoftwareLink ()

Public Attributes

 $mAffectedRows = null
 $mInsertId = null
 $mLastResult = null
 $numeric_version = null

Protected Member Functions

 doQuery ($sql)
 The DBMS-dependent part of query()
 replaceVars ($ins)
 Postgres specific version of replaceVars.

Detailed Description

Definition at line 103 of file DatabasePostgres.php.


Member Function Documentation

Parameters:
$snull|bool|Blob
Returns:
int|string

Reimplemented from DatabaseBase.

Definition at line 899 of file DatabasePostgres.php.

Referenced by constraintExists(), listTables(), relationExists(), and triggerExists().

Here is the caller graph for this function:

Get the number of rows affected by the last write query.

See also:
http://www.php.net/mysql_affected_rows
Returns:
int

Implements DatabaseType.

Definition at line 357 of file DatabasePostgres.php.

DatabasePostgres::aggregateValue ( valuedata,
valuename = 'value' 
)

Return aggregated value function call.

Reimplemented from DatabaseBase.

Definition at line 721 of file DatabasePostgres.php.

DatabasePostgres::buildConcat ( stringList)

Build a concatenation list to feed into a SQL query.

Parameters:
$stringListArray: list of raw SQL expressions; caller is responsible for any quoting
Returns:
String

Reimplemented from DatabaseBase.

Definition at line 1002 of file DatabasePostgres.php.

Returns true if this database supports (and uses) cascading deletes.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 113 of file DatabasePostgres.php.

Returns true if this database supports (and uses) triggers (e.g.

on the page table)

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 116 of file DatabasePostgres.php.

Closes a database connection, if it is open Returns success, true if already closed.

Reimplemented from DatabaseBase.

Definition at line 241 of file DatabasePostgres.php.

Referenced by open().

Here is the caller graph for this function:

DatabasePostgres::constraintExists ( table,
constraint 
)

Definition at line 823 of file DatabasePostgres.php.

References $res, $rows, $wgDBmwschema, addQuotes(), and DatabaseBase\query().

Here is the call graph for this function:

Return the current value of a sequence.

Assumes it has been nextval'ed in this session.

Definition at line 657 of file DatabasePostgres.php.

References $res, fetchRow(), and DatabaseBase\query().

Here is the call graph for this function:

DatabasePostgres::dataSeek ( res,
row 
)

Change the position of the cursor in a result object.

See also:
http://www.php.net/mysql_data_seek
Parameters:
$resMixed: A SQL result
$rowMixed: Either MySQL row or ResultWrapper

Implements DatabaseType.

Definition at line 339 of file DatabasePostgres.php.

References $res.

Some DBMSs return a special placeholder object representing blob fields in result objects.

Pass the object through this function to return the original string.

Parameters:
$bstring
Returns:
string

Reimplemented from DatabaseBase.

Definition at line 884 of file DatabasePostgres.php.

DatabasePostgres::doQuery ( sql) [protected]

The DBMS-dependent part of query()

Parameters:
$sqlString: SQL query.
Returns:
ResultWrapper Result object to feed to fetchObject, fetchRow, ...; or false on failure

Reimplemented from DatabaseBase.

Definition at line 250 of file DatabasePostgres.php.

Referenced by hasConstraint(), and open().

Here is the caller graph for this function:

DatabasePostgres::duplicateTableStructure ( oldName,
newName,
temporary = false,
fname = 'DatabasePostgres::duplicateTableStructure' 
)

Creates a new table with structure copied from existing table Note that unlike most database abstraction functions, this function does not automatically append database prefix, because it works at a lower abstraction level.

The table names passed to this function shall not be quoted (this function calls addIdentifierQuotes when needed).

Parameters:
$oldNameString: name of table whose structure should be copied
$newNameString: name of table to be created
$temporaryBoolean: whether the new table should be temporary
$fnameString: calling function name
Returns:
Boolean: true if operation was successful

Reimplemented from DatabaseBase.

Definition at line 690 of file DatabasePostgres.php.

References $fname, DatabaseBase\addIdentifierQuotes(), and DatabaseBase\query().

Here is the call graph for this function:

Parameters:
$b
Returns:
Blob

Reimplemented from DatabaseBase.

Definition at line 880 of file DatabasePostgres.php.

DatabasePostgres::estimateRowCount ( table,
vars = '*',
conds = '',
fname = 'DatabasePostgres::estimateRowCount',
options = array() 
)

Estimate rows in dataset Returns estimated count, based on EXPLAIN output This is not necessarily an accurate estimate, so use sparingly Returns -1 if count cannot be found Takes same arguments as Database::select()

Reimplemented from DatabaseBase.

Definition at line 375 of file DatabasePostgres.php.

References $count, $fname, $options, $res, $rows, fetchRow(), and DatabaseBase\select().

Here is the call graph for this function:

Fetch the next row from the given result object, in object form.

Fields can be retrieved with $row->fieldname, with fields acting like member variables.

Parameters:
$resResultWrapper|object as returned from DatabaseBase::query(), etc.
Returns:
Row object
Exceptions:
DBUnexpectedErrorThrown if the database returns an error

Implements DatabaseType.

Definition at line 275 of file DatabasePostgres.php.

References $res, wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by textFieldSize().

Here is the call graph for this function:

Here is the caller graph for this function:

Fetch the next row from the given result object, in associative array form.

Fields are retrieved with $row['fieldname'].

Parameters:
$resResultWrapper result object as returned from DatabaseBase::query(), etc.
Returns:
Row object
Exceptions:
DBUnexpectedErrorThrown if the database returns an error

Implements DatabaseType.

Definition at line 292 of file DatabasePostgres.php.

References $res, wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by currentSequenceValue(), estimateRowCount(), and nextSequenceValue().

Here is the call graph for this function:

Here is the caller graph for this function:

DatabasePostgres::fieldInfo ( table,
field 
)

mysql_fetch_field() wrapper Returns false if the field doesn't exist

Parameters:
$tablestring: table name
$fieldstring: field name
Returns:
Field

Implements DatabaseType.

Definition at line 857 of file DatabasePostgres.php.

References PostgresField\fromText().

Here is the call graph for this function:

DatabasePostgres::fieldName ( res,
n 
)

Get a field name in a result object.

See also:
http://www.php.net/mysql_field_name
Parameters:
$resMixed: A SQL result
$nInteger
Returns:
string

Implements DatabaseType.

Definition at line 325 of file DatabasePostgres.php.

References $n, and $res.

DatabasePostgres::fieldType ( res,
index 
)

pg_field_type() wrapper

Reimplemented from DatabaseBase.

Definition at line 864 of file DatabasePostgres.php.

References $res.

Free a result object returned by query() or select().

It's usually not necessary to call this, just use unset() or let the variable holding the result object go out of scope.

Parameters:
$resMixed: A SQL result

Reimplemented from DatabaseBase.

Definition at line 263 of file DatabasePostgres.php.

References $ok, $res, wfRestoreWarnings(), and wfSuppressWarnings().

Here is the call graph for this function:

Returns true if this database can use functional indexes.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 134 of file DatabasePostgres.php.

Get the current DB name.

Reimplemented from DatabaseBase.

Definition at line 994 of file DatabasePostgres.php.

Get search engine class.

All subclasses of this need to implement this if they wish to use searching.

Returns:
String

Reimplemented from DatabaseBase.

Definition at line 1006 of file DatabasePostgres.php.

Get the server hostname or IP address.

Reimplemented from DatabaseBase.

Definition at line 998 of file DatabasePostgres.php.

Returns:
string Version information from the database

Implements DatabaseType.

Definition at line 735 of file DatabasePostgres.php.

Referenced by insert().

Here is the caller graph for this function:

static DatabasePostgres::getSoftwareLink ( ) [static]
Returns:
string wikitext of a link to the server software's web site

Implements DatabaseType.

Definition at line 728 of file DatabasePostgres.php.

Get the type of the DBMS, as it appears in $wgDBtype.

Returns:
string

Implements DatabaseType.

Definition at line 109 of file DatabasePostgres.php.

Definition at line 138 of file DatabasePostgres.php.

References $res, $wgDBmwschema, doQuery(), and numRows().

Here is the call graph for this function:

Returns true if this database does an implicit sort when doing GROUP BY.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 125 of file DatabasePostgres.php.

Returns true if this database does an implicit order by when the column has an index For example: SELECT page_title FROM page LIMIT 1.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 128 of file DatabasePostgres.php.

DatabasePostgres::indexInfo ( table,
index,
fname = 'DatabasePostgres::indexInfo' 
)

Returns information about an index If errors are explicitly ignored, returns NULL on failure.

Implements DatabaseType.

Definition at line 393 of file DatabasePostgres.php.

References $fname, $res, and DatabaseBase\query().

Here is the call graph for this function:

DatabasePostgres::indexUnique ( table,
index,
fname = 'DatabasePostgres::indexUnique' 
)

Definition at line 407 of file DatabasePostgres.php.

References $fname, $res, DatabaseBase\indexName(), DatabaseBase\query(), and strencode().

Here is the call graph for this function:

DatabasePostgres::insert ( table,
args,
fname = 'DatabasePostgres::insert',
options = array() 
)

INSERT wrapper, inserts an array into a table.

$args may be a single associative array, or an array of these with numeric keys, for multi-row insert (Postgres version 8.2 and above only).

Parameters:
$tableString: Name of the table to insert to.
$argsArray: Items to insert into the table.
$fnameString: Name of the function, for profiling
$optionsString or Array. Valid options: IGNORE
Returns:
bool Success of insert operation. IGNORE always returns true.

Reimplemented from DatabaseBase.

Definition at line 435 of file DatabasePostgres.php.

References $fname, $ignore, $keys, $options, $res, DatabaseBase\begin(), DatabaseBase\commit(), getServerVersion(), DatabaseBase\makeList(), DatabaseBase\query(), and tableName().

Here is the call graph for this function:

This must be called after nextSequenceVal.

Implements DatabaseType.

Definition at line 335 of file DatabasePostgres.php.

DatabasePostgres::insertSelect ( destTable,
srcTable,
varMap,
conds,
fname = 'DatabasePostgres::insertSelect',
insertOptions = array(),
selectOptions = array() 
)

INSERT SELECT wrapper $varMap must be an associative array of the form array( 'dest1' => 'source1', ...) Source items may be literals rather then field names, but strings should be quoted with Database::addQuotes() $conds may be "*" to copy the whole table srcTable may be an array of tables.

Todo:
FIXME: Implement this a little better (seperate select/insert)?

Reimplemented from DatabaseBase.

Definition at line 559 of file DatabasePostgres.php.

References $fname, $ignore, $res, DatabaseBase\begin(), DatabaseBase\commit(), DatabaseBase\makeList(), makeSelectOptions(), DatabaseBase\query(), and tableName().

Here is the call graph for this function:

Get the last error number.

See also:
http://www.php.net/mysql_errno
Returns:
int

Implements DatabaseType.

Definition at line 353 of file DatabasePostgres.php.

Referenced by wasDeadlock().

Here is the caller graph for this function:

Get a description of the last error.

See also:
http://www.php.net/mysql_error
Returns:
string

Implements DatabaseType.

Definition at line 346 of file DatabasePostgres.php.

Referenced by open().

Here is the caller graph for this function:

DatabasePostgres::limitResult ( sql,
limit,
offset = false 
)

Construct a LIMIT query with optional offset.

This is used for query pages. The SQL should be adjusted so that only the first $limit rows are returned. If $offset is provided as well, then the first $offset rows should be discarded, and the next $limit rows should be returned. If the result of the query is not ordered, then the rows to be returned are theoretically arbitrary.

$sql is expected to be a SELECT, if that makes a difference. For UPDATE, limitResultForUpdate should be used.

The version provided by default works in MySQL and SQLite. It will very likely need to be overridden for most other DBMSes.

Parameters:
$sqlString SQL query we will append the limit too
$limitInteger the SQL limit
$offsetInteger|false the SQL offset (default false)
Returns:
string

Reimplemented from DatabaseBase.

Definition at line 682 of file DatabasePostgres.php.

Parameters:
$sql
$num
Returns:
string

Reimplemented from DatabaseBase.

Definition at line 872 of file DatabasePostgres.php.

DatabasePostgres::listTables ( prefix = null,
fname = 'DatabasePostgres::listTables' 
)

List all tables on the database.

Parameters:
$prefixOnly show tables with this prefix, e.g. mw_
$fnameString: calling function name

Reimplemented from DatabaseBase.

Definition at line 696 of file DatabasePostgres.php.

References $fname, $result, $wgDBmwschema, addQuotes(), and DatabaseBase\query().

Here is the call graph for this function:

Definition at line 229 of file DatabasePostgres.php.

Referenced by open().

Here is the caller graph for this function:

Various select options.

Access:
private
Parameters:
$optionsArray: an associative array of options to be turned into an SQL query, valid keys are listed in the function.
Returns:
array

Reimplemented from DatabaseBase.

Definition at line 944 of file DatabasePostgres.php.

References $options.

Referenced by insertSelect().

Here is the caller graph for this function:

Return the next in a sequence, save the value for retrieval via insertId()

Reimplemented from DatabaseBase.

Definition at line 646 of file DatabasePostgres.php.

References $res, fetchRow(), and DatabaseBase\query().

Here is the call graph for this function:

Get the number of fields in a result object.

See also:
http://www.php.net/mysql_num_fields
Parameters:
$resMixed: A SQL result
Returns:
int

Implements DatabaseType.

Definition at line 318 of file DatabasePostgres.php.

References $res.

Get the number of rows in a result object.

Parameters:
$resMixed: A SQL result
Returns:
int

Implements DatabaseType.

Definition at line 305 of file DatabasePostgres.php.

References $n, $res, wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by hasConstraint().

Here is the call graph for this function:

Here is the caller graph for this function:

DatabasePostgres::open ( server,
user,
password,
dbName 
)

Usually aborts on failure.

Implements DatabaseType.

Definition at line 149 of file DatabasePostgres.php.

References $user, $wgCommandLineMode, $wgDBmwschema, $wgDBport, DatabaseBase\addIdentifierQuotes(), close(), doQuery(), DatabaseBase\installErrorHandler(), lastError(), makeConnectionString(), DatabaseBase\query(), DatabaseBase\restoreErrorHandler(), schemaExists(), and wfDebug().

Referenced by selectDB().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 259 of file DatabasePostgres.php.

References $fname, and DatabaseBase\query().

Here is the call graph for this function:

DatabasePostgres::realTableName ( name,
format = 'quoted' 
)

Definition at line 639 of file DatabasePostgres.php.

References tableName().

Referenced by relationExists(), and tableName().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns true if this database uses timestamps rather than integers.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 122 of file DatabasePostgres.php.

DatabasePostgres::relationExists ( table,
types,
schema = false 
)

Query whether a given relation exists (in the given schema, or the default mw one if not given)

Definition at line 756 of file DatabasePostgres.php.

References $count, $res, $wgDBmwschema, addQuotes(), DatabaseBase\query(), and realTableName().

Referenced by sequenceExists(), and tableExists().

Here is the call graph for this function:

Here is the caller graph for this function:

DatabasePostgres::replaceVars ( ins) [protected]

Postgres specific version of replaceVars.

Calls the parent version in Database.php

Access:
private
Parameters:
$insString: SQL string, read from a stream (usually tables.sql)
Returns:
string SQL string

Reimplemented from DatabaseBase.

Definition at line 920 of file DatabasePostgres.php.

Returns true if a given role (i.e.

user) exists, false otherwise.

Definition at line 851 of file DatabasePostgres.php.

References DatabaseBase\selectField().

Here is the call graph for this function:

DatabasePostgres::ruleExists ( table,
rule 
)

Definition at line 811 of file DatabasePostgres.php.

References $wgDBmwschema, and DatabaseBase\selectField().

Here is the call graph for this function:

Query whether a given schema exists.

Returns true if it does, false if it doesn't.

Definition at line 842 of file DatabasePostgres.php.

References DatabaseBase\selectField().

Referenced by open().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns true if this database can do a native search on IP columns e.g.

this works as expected: .. WHERE rc_ip = '127.42.12.102/32';

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 131 of file DatabasePostgres.php.

Postgres doesn't support selectDB in the same way MySQL does.

So if the DB name doesn't match the open connection, open a new one

Returns:

Reimplemented from DatabaseBase.

Definition at line 221 of file DatabasePostgres.php.

References open().

Here is the call graph for this function:

DatabasePostgres::sequenceExists ( sequence,
schema = false 
)

Definition at line 783 of file DatabasePostgres.php.

References relationExists().

Here is the call graph for this function:

DatabasePostgres::setFakeMaster ( enabled = true)

Make this connection a fake master.

Parameters:
$enabledbool

Reimplemented from DatabaseBase.

Definition at line 992 of file DatabasePostgres.php.

DatabasePostgres::streamStatementEnd ( &$  sql,
&$  newLine 
)

Called by sourceStream() to check if we've reached a statement end.

Parameters:
$sqlString SQL assembled so far
$newLineString New line about to be added to $sql
Returns:
Bool Whether $newLine contains end of the statement

Reimplemented from DatabaseBase.

Definition at line 1010 of file DatabasePostgres.php.

Wrapper for addslashes()

Parameters:
$sstring: to be slashed.
Returns:
string: slashed string.

Implements DatabaseType.

Definition at line 891 of file DatabasePostgres.php.

Referenced by indexUnique().

Here is the caller graph for this function:

Returns true if this database is strict about what can be put into an IP field.

Specifically, it uses a NULL value instead of an empty string.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 119 of file DatabasePostgres.php.

DatabasePostgres::tableExists ( table,
fname = __METHOD__,
schema = false 
)

For backward compatibility, this function checks both tables and views.

Definition at line 779 of file DatabasePostgres.php.

References relationExists().

Here is the call graph for this function:

DatabasePostgres::tableName ( name,
format = 'quoted' 
)

Format a table name ready for use in constructing an SQL query.

This does two important things: it quotes the table names to clean them up, and it adds a table prefix if only given a table name with no quotes.

All functions of this object which require a table name call this function themselves. Pass the canonical name to such functions. This is only needed when calling query() directly.

Parameters:
$nameString: database table name
$formatString One of: quoted - Automatically pass the table name through addIdentifierQuotes() so that it can be used in a query. raw - Do not add identifier quotes to the table name
Returns:
String: full database name

Reimplemented from DatabaseBase.

Definition at line 626 of file DatabasePostgres.php.

References realTableName().

Referenced by insert(), insertSelect(), realTableName(), and textFieldSize().

Here is the call graph for this function:

Here is the caller graph for this function:

DatabasePostgres::textFieldSize ( table,
field 
)

Returns the size of a text field, or -1 for "unlimited".

Parameters:
$tablestring
$fieldstring
Returns:
int

Reimplemented from DatabaseBase.

Definition at line 666 of file DatabasePostgres.php.

References $res, $size, fetchObject(), DatabaseBase\query(), and tableName().

Here is the call graph for this function:

Convert a timestamp in one of the formats accepted by wfTimestamp() to the format used for inserting into timestamp fields in this DBMS.

The result is unquoted, and needs to be passed through addQuotes() before it can be included in raw SQL.

Parameters:
$tsstring|int
Returns:
string

Reimplemented from DatabaseBase.

Definition at line 714 of file DatabasePostgres.php.

References wfTimestamp().

Here is the call graph for this function:

DatabasePostgres::triggerExists ( table,
trigger 
)

Definition at line 787 of file DatabasePostgres.php.

References $res, $rows, $wgDBmwschema, addQuotes(), and DatabaseBase\query().

Here is the call graph for this function:

Determines if the last failure was due to a deadlock STUB.

Returns:
bool

Reimplemented from DatabaseBase.

Definition at line 686 of file DatabasePostgres.php.

References lastErrno().

Here is the call graph for this function:


Member Data Documentation

DatabasePostgres::$mAffectedRows = null

Definition at line 107 of file DatabasePostgres.php.

DatabasePostgres::$mInsertId = null

Definition at line 104 of file DatabasePostgres.php.

DatabasePostgres::$mLastResult = null

Definition at line 105 of file DatabasePostgres.php.

DatabasePostgres::$numeric_version = null

Definition at line 106 of file DatabasePostgres.php.


The documentation for this class was generated from the following file: