PHP Class Postgres, phppgadmin

Inheritance: extends ADODB_base
Afficher le fichier Open project: phppgadmin/phppgadmin Class Usage Examples

Méthodes publiques

Свойство Type Description
$_maxNameLen Max object name length
$_schema Store the current schema
$codemap encoding name is the same as its database encoding name.
$defaultprops
$extraTypes Extra "magic" types. BIGSERIAL was added in PostgreSQL 7.2.
$fkactions Foreign key stuff. First element MUST be the default.
$fkdeferrable
$fkinitial
$fkmatches
$funcprops Function properties
$help_base Default help URL
$help_page Help sub pages
$id Name of id column
$joinOps Supported join operations for use with view wizard
$langmap Map of internal language name to syntax highlighting name
$major_version
$predefined_size_types Predefined size types
$privlist of objects.
$privmap refer to.
$rule_events Rule action types
$selectOps Select operators
$triggerEvents Array of allowed trigger events
$triggerExecTimes When to execute the trigger
$triggerFrequency How often to execute the trigger
$typAlignDef The default type alignment
$typAligns Array of allowed type alignments
$typIndexDef Default index type
$typIndexes Array of allowed index types
$typStorageDef The default type storage
$typStorages Array of allowed type storage attributes

Méthodes publiques

Méthode Description
Postgres ( $conn ) Constructor
_encryptPassword ( $username, $password ) Helper function that computes encypted PostgreSQL passwords
_parseACL ( $acl ) : Privileges Internal function used for parsing ACLs
addCheckConstraint ( $table, $definition, $name = '' ) Adds a check constraint to a table
addColumn ( $table, $column, $type, $array, $length, $notnull, $default, $comment ) Add a new column to a table
addDomainCheckConstraint ( $domain, $definition, $name = '' ) Adds a check constraint to a domain
addForeignKey ( $table, $targschema, $targtable, $sfields, $tfields, $upd_action, $del_action, $match, $deferrable, $initially, $name = '' ) : -1 Adds a foreign key constraint to a table
addGroupMember ( $groname, $user ) Adds a group member
addPrimaryKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 Adds a primary key constraint to a table
addUniqueKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 Adds a unique constraint to a table
alreadyClustered ( $table ) : true test if a table has been clustered on an index
alterAggregate ( $aggrname, $aggrtype, $aggrowner, $aggrschema, $aggrcomment, $newaggrname, $newaggrowner, $newaggrschema, $newaggrcomment ) : -4 Alters an aggregate
alterColumn ( $table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, $type, $length, $array, $oldtype, $comment ) : -6 Alters a column in a table
alterDatabase ( $dbName, $newName, $newOwner = '', $comment = '' ) : -4 Alters a database the multiple return vals are for postgres 8+ which support more functionality in alter database
alterDatabaseOwner ( string $dbName, string $newOwner ) : integer Changes ownership of a database This can only be done by a superuser or the owner of the database
alterDatabaseRename ( string $oldName, string $newName ) : integer Renames a database, note that this operation cannot be performed on a database that is currently being connected to
alterDomain ( $domain, $domdefault, $domnotnull, $domowner ) : -4 Alters a domain
alterSequence ( $sequence, $name, $comment, $owner = null, $schema = null, $increment = null, $minvalue = null, $maxvalue = null, $restartvalue = null, $cachevalue = null, $cycledvalue = null, $startvalue = null ) : -2 Alters a sequence
alterSequenceName ( $seqrs, $name ) Rename a sequence
alterSequenceOwner ( $seqrs, $owner ) Alter a sequence's owner
alterSequenceProps ( $seqrs, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) Alter a sequence's properties
alterSequenceSchema ( $seqrs, $schema ) Alter a sequence's schema
alterTable ( $table, $name, $owner, $schema, $comment, $tablespace ) : -2 Alter table properties
alterTableName ( $tblrs, $name = null ) Alter a table's name !\ this function is called from _alterTable which take care of escaping fields
alterTableOwner ( $tblrs, $owner = null ) Alter a table's owner !\ this function is called from _alterTable which take care of escaping fields
alterTableSchema ( $tblrs, $schema = null ) Alter a table's schema !\ this function is called from _alterTable which take care of escaping fields
alterTableTablespace ( $tblrs, $tablespace = null ) Alter a table's tablespace !\ this function is called from _alterTable which take care of escaping fields
alterTablespace ( $spcname, $name, $owner, $comment = '' ) : -4 Alters a tablespace
alterTrigger ( $table, $trigger, $name ) Alters a trigger
alterView ( $view, $name, $owner, $schema, $comment ) : -2 Alter view properties
alterViewName ( $vwrs, $name ) Rename a view
alterViewOwner ( $vwrs, $owner = null ) Alter a view's owner
alterViewSchema ( $vwrs, $schema ) Alter a view's schema
analyzeDB ( $table = '' ) Analyze a database
arrayClean ( &$arr ) : The Cleans (escapes) an array
beginDump ( ) Sets up the data object for a dump. eg. Starts the appropriate transaction, sets variables, etc.
browseQuery ( $type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages ) : -5 Returns a recordset of all columns in a query. Supports paging.
browseQueryCount ( $query, $count ) : -1 Finds the number of rows that would be returned by a query.
browseRow ( $table, $key ) : A Returns a recordset of all columns in a table
changeAggregateOwner ( $aggrname, $aggrtype, $newaggrowner ) Changes the owner of an aggregate function
changeAggregateSchema ( $aggrname, $aggrtype, $newaggrschema ) Changes the schema of an aggregate function
changeFtsMapping ( $ftscfg, array $mapping, string $action, string $dictname = null ) Creates/updates/deletes FTS mapping.
changePassword ( $rolename, $password ) Changes a role's password
clean ( &$str ) : The Cleans (escapes) a string
clusterIndex ( $table = '', $index = '' ) Clusters an index
createAggregate ( $name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment ) : -1 Creates a new aggregate in the database
createCompositeType ( $name, $fields, $field, $type, $array, $length, $colcomment, $typcomment ) : -1 Creates a new composite type in the database
createDatabase ( $database, $encoding, $tablespace = '', $comment = '', $template = 'template1', $lc_collate = '', $lc_ctype = '' ) : -2 Creates a database
createDomain ( $domain, $type, $length, $array, $notnull, $default, $check ) Creates a domain
createEnumType ( $name, $values, $typcomment ) : -2 Creates a new enum type in the database
createFtsConfiguration ( string $cfgname, string $parser = '', string $template = '', string $comment = '' ) Creates a new FTS configuration.
createFtsDictionary ( string $dictname, boolean $isTemplate = false, string $template = '', string $lexize = '', string $init = '', string $option = '', string $comment = '' ) Creates a new FTS dictionary or FTS dictionary template.
createFunction ( $funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false ) : -4 Creates a new function.
createGroup ( $groname, $users ) Creates a new group
createIndex ( $name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently ) Creates an index
createRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers ) Creates a new role
createRule ( $name, $event, $table, $where, $instead, $type, $action, $replace = false ) : -1 Creates a rule
createSchema ( $schemaname, $authorization = '', $comment = '' ) Creates a new schema.
createSequence ( $sequence, $increment, $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue ) Creates a new sequence
createTable ( $name, $fields, $field, $type, $array, $length, $notnull, $default, $withoutoids, $colcomment, $tblcomment, $tablespace, $uniquekey, $primarykey ) : -1 Creates a new table in the database
createTableLike ( $name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '' ) Creates a new table in the database copying attribs and other properties from another table
createTablespace ( $spcname, $spcowner, $spcloc, $comment = '' ) Creates a tablespace
createTrigger ( $tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs ) Creates a trigger
createType ( $typname, $typin, $typout, $typlen, $typdef, $typelem, $typdelim, $typbyval, $typalign, $typstorage ) Creates a new type
createUser ( $username, $password, $createdb, $createuser, $expiry, $groups ) Creates a new user
createView ( $viewname, $definition, $replace, $comment ) Creates a new view.
dbBool ( &$parameter ) Change the value of a parameter to 't' or 'f' depending on whether it evaluates to true or false
deleteRow ( $table, $key, $schema = false ) Delete a row from a table
disableTrigger ( $tgname, $table ) Disables a trigger
dropAggregate ( $aggrname, $aggrtype, $cascade ) Removes an aggregate function from the database
dropAutovacuum ( $table )
dropCheckConstraint ( $table, $name ) : -4 Drops a check constraint from a table
dropColumn ( $table, $column, $cascade ) Drops a column from a table
dropColumnDefault ( $table, $column ) Drops default value of a column
dropConstraint ( $constraint, $relation, $type, $cascade ) Removes a constraint from a relation
dropDatabase ( $database ) Drops a database
dropDomain ( $domain, $cascade ) Drops a domain.
dropDomainConstraint ( $domain, $constraint, $cascade ) Drops a domain constraint
dropFtsConfiguration ( $ftscfg, $cascade ) Drops FTS coniguration
dropFtsDictionary ( $ftsdict, $cascade ) Drops FTS dictionary
dropFunction ( $function_oid, $cascade ) Drops a function.
dropGroup ( $groname ) Removes a group
dropGroupMember ( $groname, $user ) Removes a group member
dropIndex ( $index, $cascade ) Removes an index from the database
dropOperator ( $operator_oid, $cascade ) Drops an operator
dropRole ( $rolename ) Removes a role
dropRule ( $rule, $relation, $cascade ) Removes a rule from a table OR view
dropSchema ( $schemaname, $cascade ) Drops a schema.
dropSequence ( $sequence, $cascade ) Drops a given sequence
dropTable ( $table, $cascade ) Removes a table from the database
dropTablespace ( $spcname ) Drops a tablespace
dropTrigger ( $tgname, $table, $cascade ) Drops a trigger
dropType ( $typname, $cascade ) Drops a type.
dropUser ( $username ) Removes a user
dropView ( $viewname, $cascade ) Drops a view.
dumpRelation ( $relation, $oids ) : -1 Returns a recordset of all columns in a relation. Used for data export.
editRow ( $table, $vars, $nulls, $format, $types, $keyarr ) : -1 Updates a row in a table
emptyTable ( $table ) Empties a table in the database
enableTrigger ( $tgname, $table ) Enables a trigger
endDump ( ) Ends the data object for a dump.
escapeBytea ( $data ) : Data Escapes bytea data for display on the screen
executeScript ( $name, $callback = null ) : True Executes an SQL script as a series of SQL statements. Returns the result of the final step. This is a very complicated lexer based on the REL7_4_STABLE src/bin/psql/mainloop.c lexer in the PostgreSQL source code.
fieldArrayClean ( &$arr ) : The Cleans (escapes) an array of field names
fieldClean ( &$str ) : The Cleans (escapes) an object name (eg. table, field)
findObject ( $term, $filter ) : A Searches all system catalogs to find objects that match a certain name.
formatType ( $typname, $typmod ) Formats a type correctly for display. Postgres 7.0 had no 'format_type' built-in function, and hence we need to do it manually.
formatValue ( $type, $format, $value ) : The Formats a value or expression for sql purposes
getAggregate ( $name, $basetype ) : A Gets all information for an aggregate
getAggregates ( ) : A Gets all aggregates
getAttributeNames ( $table, $atts ) : -2 Given an array of attnums and a relation, returns an array mapping attribute number to attribute name.
getAutovacuum ( ) : associative Returns all autovacuum global configuration
getCasts ( ) : All Returns a list of all casts in the database
getChangeUserSQL ( $user ) : The Returns the SQL for changing the current user
getConstraints ( $table ) : A Returns a list of all constraints on a table
getConstraintsWithFields ( $table ) : a Returns a list of all constraints on a table, including constraint name, definition, related col and referenced namespace, table and col if needed
getConversions ( ) : All Returns a list of all conversions in the database
getDatabase ( $database ) : The Return all information about a particular database
getDatabaseComment ( string $database ) : recordset Return the database comment of a db from the shared description table
getDatabaseEncoding ( ) : The Returns the current database encoding
getDatabaseOwner ( string $database ) : recordset Return the database owner of a db
getDatabases ( $currentdatabase = NULL ) : A Return all database available on the server
getDefaultWithOid ( ) : default_with_oids Returns the current default_with_oids setting
getDomain ( $domain ) : A Gets all information for a single domain
getDomainConstraints ( $domain ) : A Get domain constraints
getDomains ( ) : All Return all domains in current schema. Excludes domain constraints.
getEnumValues ( $name ) : A Get defined values for a given enum
getFtsConfigurationByName ( $ftscfg ) : FTS Return all information related to a FTS configuration
getFtsConfigurationMap ( string $ftscfg ) : RecordSet Returns the map of FTS configuration given (list of mappings (tokens) and their processing dictionaries)
getFtsConfigurations ( $all = true ) : A Returns available FTS configurations
getFtsDictionaries ( $all = true ) Returns FTS dictionaries available
getFtsDictionaryByName ( $ftsdict ) : RecordSet Return all information relating to a FTS dictionary
getFtsDictionaryTemplates ( ) Returns all FTS dictionary templates available
getFtsMappingByName ( $ftscfg, $mapping ) : FTS Return all information related to a given FTS configuration's mapping
getFtsMappings ( $ftscfg ) Return list of FTS mappings possible for given parser (specified by given configuration since configuration can only have 1 parser)
getFtsParsers ( $all = true ) : RecordSet Returns FTS parsers available
getFunction ( $function_oid ) : Function Returns all details for a particular function
getFunctionProperties ( $f ) : An Returns an array containing a function's properties
getFunctions ( $all = false, $type = null ) : All Returns a list of all functions in the database
getGroup ( $groname ) : All Return users in a specific group
getGroups ( ) : All Returns all groups in the database cluser
getHelp ( $help ) Fetch a URL (or array of URLs) for a given help page.
getHelpPages ( )
getIndexes ( $table = '', $unique = false ) : A Grabs a list of indexes for a table
getLanguages ( $all = false ) : A Gets all languages
getLinkingKeys ( $tables ) : -1 A function for getting all columns linked by foreign keys given a group of tables
getLocks ( ) : A Returns table locks information in the current database
getMemberOf ( $rolename ) : All Returns all role names which the role belongs to
getMembers ( $rolename, $admin = 'f' ) : All Returns all role names that are members of a role
getOpClasses ( ) : A Gets all opclasses
getOperator ( $operator_oid ) : Function Returns all details for a particular operator
getOperators ( ) : All Returns a list of all operators in the database
getPreparedXacts ( $database = null ) : A Returns prepared transactions information
getPrivileges ( $object, $type, $table = null ) : -3 Grabs an array of users and their privileges for an object, given its type.
getProcesses ( $database = null ) : A Returns all available process information.
getReferrers ( $table ) : A Finds the foreign keys that refer to the specified table
getRole ( $rolename ) : The Returns information about a single role
getRoles ( $rolename = '' ) : All Returns all roles in the database cluster
getRowIdentifier ( $table ) : -1 Get the fields for uniquely identifying a row in a table
getRules ( $table ) : A Returns a list of all rules on a table OR view
getSchemaByName ( $schema ) : Schema Return all information relating to a schema
getSchemas ( ) : All Return all schemas in the current database.
getSearchPath ( ) : Array Return the current schema search path
getSelectSQL ( $table, $show, $values, $ops, $orderby = [] ) : The Generates the SQL for the 'select' function
getSequence ( $sequence ) : A Returns properties of a single sequence
getSequences ( $all = false ) : A Returns all sequences in the current database
getStatsDatabase ( $database ) : A Fetches statistics for a database
getStatsIndexIO ( $table ) : A Fetches I/0 statistics for all indexes on a table
getStatsIndexTuples ( $table ) : A Fetches tuple statistics for all indexes on a table
getStatsTableIO ( $table ) : A Fetches I/0 statistics for a table
getStatsTableTuples ( $table ) : A Fetches tuple statistics for a table
getTable ( $table ) : A Returns table information
getTableAttributes ( $table, $field = '' ) : All Retrieve the attribute definition of a table
getTableAutovacuum ( $table = '' ) : A Returns all available autovacuum per table information.
getTableChildren ( $table ) : A Finds the names and schemas of child tables
getTableDefPrefix ( $table, $clean = false ) : null Returns the SQL definition for the table.
getTableDefSuffix ( $table ) : null Returns extra table definition information that is most usefully dumped after the table contents for speed and efficiency reasons
getTableParents ( $table ) : A Finds the names and schemas of parent tables (in order)
getTables ( $all = false ) : All Return all tables in current database (and schema)
getTablespace ( $spcname ) : A Retrieves a tablespace's information
getTablespaces ( $all = false ) : A Retrieves information for all tablespaces
getTrigger ( $table, $trigger ) : A Grabs a single trigger
getTriggerDef ( $trigger ) : The A helper function for getTriggers that translates an array of attribute numbers to an array of field names.
getTriggerFunctions ( ) Returns a list of all functions that can be used in triggers
getTriggers ( $table = '' ) : A Grabs a list of triggers on a table
getType ( $typname ) : Type Returns all details for a particular type
getTypes ( $all = false, $tabletypes = false, $domains = false ) : A Returns a list of all types in the database
getUser ( $username ) : The Returns information about a single user
getUsers ( ) : All Returns all users in the database cluster
getVariables ( ) : A Returns all available variable information.
getView ( $view ) : View Returns all details for a particular view
getViews ( ) : All Returns a list of all views in the database
grantRole ( $role, $rolename, $admin ) Grants membership in a role
hasAggregateSortOp ( ) Capabilities
hasAlterAggregate ( )
hasAlterColumnType ( )
hasAlterDatabase ( )
hasAlterDatabaseOwner ( )
hasAlterDatabaseRename ( )
hasAlterDomains ( )
hasAlterSchema ( )
hasAlterSchemaOwner ( )
hasAlterSequenceSchema ( )
hasAlterSequenceStart ( )
hasAlterTableSchema ( )
hasAutovacuum ( )
hasByteaHexDefault ( )
hasConcurrentIndexBuild ( )
hasCreateFieldWithConstraints ( )
hasCreateTableLike ( )
hasCreateTableLikeWithConstraints ( )
hasCreateTableLikeWithIndexes ( )
hasDatabaseCollation ( )
hasDisableTriggers ( )
hasDomainConstraints ( )
hasEnumTypes ( )
hasFTS ( )
hasForceReindex ( )
hasFunctionAlterOwner ( )
hasFunctionAlterSchema ( )
hasFunctionCosting ( )
hasFunctionGUC ( )
hasGrantOption ( )
hasMagicTypes ( )
hasNamedParams ( )
hasObjectID ( $table ) : null Checks to see whether or not a table has a unique id column
hasPrepare ( )
hasPreparedXacts ( )
hasQueryCancel ( )
hasQueryKill ( )
hasReadOnlyQueries ( )
hasRecluster ( )
hasRoles ( )
hasServerAdminFuncs ( )
hasSharedComments ( )
hasTablespaces ( )
hasUserRename ( )
hasUserSignals ( )
hasVirtualTransactionId ( )
insertRow ( $table, $fields, $values, $nulls, $format, $types ) : -1 Adds a new row to a table
isSuperUser ( $username = '' ) : True Determines whether or not a user is a super user
nextvalSequence ( $sequence ) : -1 Execute nextval on a given sequence
phpBool ( $parameter ) Change a parameter from 't' or 'f' to a boolean, (others evaluate to false)
printField ( $name, $value, $type, $extras = [] ) Outputs the HTML code for a particular field
reindex ( $type, $name, $force = false ) Rebuild indexes
renameAggregate ( $aggrschema, $aggrname, $aggrtype, $newaggrname ) Renames an aggregate function
renameColumn ( $table, $column, $newName ) Renames a column in a table
renameRole ( $rolename, $newrolename ) Renames a role
renameUser ( $username, $newname ) Renames a user
resetSequence ( $sequence ) : -1 Resets a given sequence to min value of sequence
restartSequence ( $sequence ) : -1 Restart a given sequence to its start value
revokeRole ( $role, $rolename, $admin, $type = 'RESTRICT' ) Revokes membership in a role
saveAutovacuum ( $table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, $anascalefactor, $vaccostdelay, $vaccostlimit ) : A Returns all available autovacuum per table information.
sendSignal ( $pid, $signal ) : -1 Sends a cancel or kill command to a process
setColumnDefault ( $table, $column, $default ) Sets default value of a column
setColumnNull ( $table, $column, $state ) Sets whether or not a column can contain NULLs
setComment ( $obj_type, $obj_name, $table, $comment, $basetype = NULL ) Sets the comment for an object in the database
setFunction ( $function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $funcown, $newown, $funcschema, $newschema, $cost, $rows, $comment ) : -7 Updates (replaces) a function.
setPrivileges ( $mode, $type, $object, $public, $usernames, $groupnames, $privileges, $grantoption, $cascade, $table ) : -4 Grants a privilege to a user, group or public
setRenameRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold, $newrolename ) : -3 Adjusts a role's info and renames it
setRenameUser ( $username, $password, $createdb, $createuser, $expiry, $newname ) : -3 Adjusts a user's info and renames the user
setRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold ) Adjusts a role's info
setRule ( $name, $event, $table, $where, $instead, $type, $action ) : -1 Edits a rule on a table OR view
setSchema ( $schema ) Sets the current working schema. Will also set Class variable.
setSearchPath ( $paths ) : -2 Sets the current schema search path
setUser ( $username, $password, $createdb, $createuser, $expiry ) Adjusts a user's info
setView ( $viewname, $definition, $comment ) : -3 Updates a view.
setvalSequence ( $sequence, $nextvalue ) : -1 Execute setval on a given sequence
updateFtsConfiguration ( $cfgname, $comment, $name ) Alters FTS configuration
updateFtsDictionary ( $dictname, $comment, $name ) Alters FTS dictionary or dictionary template
updateSchema ( $schemaname, $comment, $name, $owner ) Updates a schema.
vacuumDB ( $table = '', $analyze = false, $full = false, $freeze = false ) Vacuums a database

Méthodes protégées

Méthode Description
_alterSequence ( $seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) : -7 Protected method which alter a sequence SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
_alterTable ( $tblrs, $name, $owner, $schema, $comment, $tablespace ) : -7 Protected method which alter a table SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
_alterView ( $vwrs, $name, $owner, $schema, $comment ) : -6 Protected method which alter a view SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION

Private Methods

Méthode Description
advance_1 ( &$i, &$prevlen, &$thislen ) A private helper method for executeScript that advances the character by 1. In psql this is careful to take into account multibyte languages, but we don't at the moment, so this function is someone redundant, since it will always advance by 1
valid_dolquote ( $dquote ) : True Private helper method to detect a valid $foo$ quote delimiter at the start of the parameter dquote

Method Details

Postgres() public méthode

Constructor
public Postgres ( $conn )
$conn The database connection

_alterSequence() protected méthode

Protected method which alter a sequence SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
protected _alterSequence ( $seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) : -7
$seqrs The sequence recordSet returned by getSequence()
$name The new name for the sequence
$comment The comment on the sequence
$owner The new owner for the sequence
$schema The new schema for the sequence
$increment The increment
$minvalue The min value
$maxvalue The max value
$restartvalue The starting value
$cachevalue The cache value
$cycledvalue True if cycled, false otherwise
$startvalue The sequence start value when issueing a restart
Résultat -7

_alterTable() protected méthode

Protected method which alter a table SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
protected _alterTable ( $tblrs, $name, $owner, $schema, $comment, $tablespace ) : -7
$tblrs The table recordSet returned by getTable()
$name The new name for the table
$owner The new owner for the table
$schema The new schema for the table
$comment The comment on the table
$tablespace The new tablespace for the table ('' means leave as is)
Résultat -7

_alterView() protected méthode

Protected method which alter a view SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
protected _alterView ( $vwrs, $name, $owner, $schema, $comment ) : -6
$vwrs The view recordSet returned by getView()
$name The new name for the view
$owner The new owner for the view
$comment The comment on the view
Résultat -6

_encryptPassword() public méthode

Helper function that computes encypted PostgreSQL passwords
public _encryptPassword ( $username, $password )
$username The username
$password The password

_parseACL() public méthode

Internal function used for parsing ACLs
public _parseACL ( $acl ) : Privileges
$acl The ACL to parse (of type aclitem[])
Résultat Privileges array

addCheckConstraint() public méthode

Adds a check constraint to a table
public addCheckConstraint ( $table, $definition, $name = '' )
$table The table to which to add the check
$definition The definition of the check
$name (optional) The name to give the check, otherwise default name is assigned

addColumn() public méthode

Add a new column to a table
public addColumn ( $table, $column, $type, $array, $length, $notnull, $default, $comment )
$table The table to add to
$column The name of the new column
$type The type of the column
$array True if array type, false otherwise
$length The optional size of the column (ie. 30 for varchar(30))
$notnull True if NOT NULL, false otherwise
$default The default for the column. '' for none.

addDomainCheckConstraint() public méthode

Adds a check constraint to a domain
public addDomainCheckConstraint ( $domain, $definition, $name = '' )
$domain The domain to which to add the check
$definition The definition of the check
$name (optional) The name to give the check, otherwise default name is assigned

addForeignKey() public méthode

Adds a foreign key constraint to a table
public addForeignKey ( $table, $targschema, $targtable, $sfields, $tfields, $upd_action, $del_action, $match, $deferrable, $initially, $name = '' ) : -1
$targschema The schema that houses the target table to which to add the foreign key
$targtable The table to which to add the foreign key
$sfields (array) An array of source fields over which to add the foreign key
$tfields (array) An array of target fields over which to add the foreign key
$upd_action The action for updates (eg. RESTRICT)
$del_action The action for deletes (eg. RESTRICT)
$match The match type (eg. MATCH FULL)
$deferrable The deferrability (eg. NOT DEFERRABLE)
$name (optional) The name to give the key, otherwise default name is assigned
Résultat -1

addGroupMember() public méthode

Adds a group member
public addGroupMember ( $groname, $user )
$groname The name of the group
$user The name of the user to add to the group

addPrimaryKey() public méthode

Adds a primary key constraint to a table
public addPrimaryKey ( $table, $fields, $name = '', $tablespace = '' ) : -1
$table The table to which to add the primery key
$fields (array) An array of fields over which to add the primary key
$name (optional) The name to give the key, otherwise default name is assigned
$tablespace (optional) The tablespace for the schema, '' indicates default.
Résultat -1

addUniqueKey() public méthode

Adds a unique constraint to a table
public addUniqueKey ( $table, $fields, $name = '', $tablespace = '' ) : -1
$table The table to which to add the unique key
$fields (array) An array of fields over which to add the unique key
$name (optional) The name to give the key, otherwise default name is assigned
$tablespace (optional) The tablespace for the schema, '' indicates default.
Résultat -1

alreadyClustered() public méthode

test if a table has been clustered on an index
public alreadyClustered ( $table ) : true
$table The table to test
Résultat true if the table has been already clustered

alterAggregate() public méthode

Alters an aggregate
public alterAggregate ( $aggrname, $aggrtype, $aggrowner, $aggrschema, $aggrcomment, $newaggrname, $newaggrowner, $newaggrschema, $newaggrcomment ) : -4
$aggrname The actual name of the aggregate
$aggrtype The actual input data type of the aggregate
$aggrowner The actual owner of the aggregate
$aggrschema The actual schema the aggregate belongs to
$aggrcomment The actual comment for the aggregate
$newaggrname The new name of the aggregate
$newaggrowner The new owner of the aggregate
$newaggrschema The new schema where the aggregate will belong to
$newaggrcomment The new comment for the aggregate
Résultat -4

alterColumn() public méthode

Alters a column in a table
public alterColumn ( $table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, $type, $length, $array, $oldtype, $comment ) : -6
$table The table in which the column resides
$column The column to alter
$name The new name for the column
$notnull (boolean) True if not null, false otherwise
$oldnotnull (boolean) True if column is already not null, false otherwise
$default The new default for the column
$olddefault The old default for the column
$type The new type for the column
$length The optional size of the column (ie. 30 for varchar(30))
$array True if array type, false otherwise
$oldtype The old type for the column
$comment Comment for the column
Résultat -6

alterDatabase() public méthode

Alters a database the multiple return vals are for postgres 8+ which support more functionality in alter database
public alterDatabase ( $dbName, $newName, $newOwner = '', $comment = '' ) : -4
$dbName The name of the database
$newName new name for the database
$newOwner The new owner for the database
Résultat -4

alterDatabaseOwner() public méthode

Changes ownership of a database This can only be done by a superuser or the owner of the database
public alterDatabaseOwner ( string $dbName, string $newOwner ) : integer
$dbName string database to change ownership of
$newOwner string user that will own the database
Résultat integer 0 on success

alterDatabaseRename() public méthode

Renames a database, note that this operation cannot be performed on a database that is currently being connected to
public alterDatabaseRename ( string $oldName, string $newName ) : integer
$oldName string name of database to rename
$newName string new name of database
Résultat integer 0 on success

alterDomain() public méthode

Alters a domain
public alterDomain ( $domain, $domdefault, $domnotnull, $domowner ) : -4
$domain The domain to alter
$domdefault The domain default
$domnotnull True for NOT NULL, false otherwise
$domowner The domain owner
Résultat -4

alterSequence() public méthode

Alters a sequence
public alterSequence ( $sequence, $name, $comment, $owner = null, $schema = null, $increment = null, $minvalue = null, $maxvalue = null, $restartvalue = null, $cachevalue = null, $cycledvalue = null, $startvalue = null ) : -2
$sequence The name of the sequence
$name The new name for the sequence
$comment The comment on the sequence
$owner The new owner for the sequence
$schema The new schema for the sequence
$increment The increment
$minvalue The min value
$maxvalue The max value
$restartvalue The starting value
$cachevalue The cache value
$cycledvalue True if cycled, false otherwise
$startvalue The sequence start value when issueing a restart
Résultat -2

alterSequenceName() public méthode

Rename a sequence
public alterSequenceName ( $seqrs, $name )
$seqrs The sequence RecordSet returned by getSequence()
$name The new name for the sequence

alterSequenceOwner() public méthode

Alter a sequence's owner
public alterSequenceOwner ( $seqrs, $owner )
$seqrs The sequence RecordSet returned by getSequence()

alterSequenceProps() public méthode

Alter a sequence's properties
public alterSequenceProps ( $seqrs, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue )
$seqrs The sequence RecordSet returned by getSequence()
$increment The sequence incremental value
$minvalue The sequence minimum value
$maxvalue The sequence maximum value
$restartvalue The sequence current value
$cachevalue The sequence cache value
$cycledvalue Sequence can cycle ?
$startvalue The sequence start value when issueing a restart

alterSequenceSchema() public méthode

Alter a sequence's schema
public alterSequenceSchema ( $seqrs, $schema )
$seqrs The sequence RecordSet returned by getSequence()

alterTable() public méthode

Alter table properties
public alterTable ( $table, $name, $owner, $schema, $comment, $tablespace ) : -2
$table The name of the table
$name The new name for the table
$owner The new owner for the table
$schema The new schema for the table
$comment The comment on the table
$tablespace The new tablespace for the table ('' means leave as is)
Résultat -2

alterTableName() public méthode

Alter a table's name !\ this function is called from _alterTable which take care of escaping fields
public alterTableName ( $tblrs, $name = null )
$tblrs The table RecordSet returned by getTable()
$name The new table's name

alterTableOwner() public méthode

Alter a table's owner !\ this function is called from _alterTable which take care of escaping fields
public alterTableOwner ( $tblrs, $owner = null )
$tblrs The table RecordSet returned by getTable()

alterTableSchema() public méthode

Alter a table's schema !\ this function is called from _alterTable which take care of escaping fields
public alterTableSchema ( $tblrs, $schema = null )
$tblrs The table RecordSet returned by getTable()

alterTableTablespace() public méthode

Alter a table's tablespace !\ this function is called from _alterTable which take care of escaping fields
public alterTableTablespace ( $tblrs, $tablespace = null )
$tblrs The table RecordSet returned by getTable()

alterTablespace() public méthode

Alters a tablespace
public alterTablespace ( $spcname, $name, $owner, $comment = '' ) : -4
$spcname The name of the tablespace
$name The new name for the tablespace
$owner The new owner for the tablespace
Résultat -4

alterTrigger() public méthode

Alters a trigger
public alterTrigger ( $table, $trigger, $name )
$table The name of the table containing the trigger
$trigger The name of the trigger to alter
$name The new name for the trigger

alterView() public méthode

Alter view properties
public alterView ( $view, $name, $owner, $schema, $comment ) : -2
$view The name of the view
$name The new name for the view
$owner The new owner for the view
$schema The new schema for the view
$comment The comment on the view
Résultat -2

alterViewName() public méthode

Rename a view
public alterViewName ( $vwrs, $name )
$vwrs The view recordSet returned by getView()
$name The new view's name

alterViewOwner() public méthode

Alter a view's owner
public alterViewOwner ( $vwrs, $owner = null )
$vwrs The view recordSet returned by getView()

alterViewSchema() public méthode

Alter a view's schema
public alterViewSchema ( $vwrs, $schema )
$vwrs The view recordSet returned by getView()

analyzeDB() public méthode

Analyze a database
public analyzeDB ( $table = '' )
$table (optional) The table to analyze

arrayClean() public méthode

Cleans (escapes) an array
public arrayClean ( &$arr ) : The
$arr The array to clean, by reference
Résultat The cleaned array

beginDump() public méthode

Sets up the data object for a dump. eg. Starts the appropriate transaction, sets variables, etc.
public beginDump ( )

browseQuery() public méthode

Returns a recordset of all columns in a query. Supports paging.
public browseQuery ( $type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages ) : -5
$type Either 'QUERY' if it is an SQL query, or 'TABLE' if it is a table identifier, or 'SELECT" if it's a select query
$table The base table of the query. NULL for no table.
$query The query that is being executed. NULL for no query.
$sortkey The column number to sort by, or '' or null for no sorting
$sortdir The direction in which to sort the specified column ('asc' or 'desc')
$page The page of the relation to retrieve
$page_size The number of rows per page
Résultat -5 recordset on success

browseQueryCount() public méthode

Finds the number of rows that would be returned by a query.
public browseQueryCount ( $query, $count ) : -1
$query The SQL query
$count The count query
Résultat -1 count of rows

browseRow() public méthode

Returns a recordset of all columns in a table
public browseRow ( $table, $key ) : A
$table The name of a table
$key The associative array holding the key to retrieve
Résultat A recordset

changeAggregateOwner() public méthode

Changes the owner of an aggregate function
public changeAggregateOwner ( $aggrname, $aggrtype, $newaggrowner )
$aggrname The name of the aggregate
$aggrtype The input data type of the aggregate
$newaggrowner The new owner of the aggregate

changeAggregateSchema() public méthode

Changes the schema of an aggregate function
public changeAggregateSchema ( $aggrname, $aggrtype, $newaggrschema )
$aggrname The name of the aggregate
$aggrtype The input data type of the aggregate
$newaggrschema The new schema for the aggregate

changeFtsMapping() public méthode

Creates/updates/deletes FTS mapping.
public changeFtsMapping ( $ftscfg, array $mapping, string $action, string $dictname = null )
$mapping array Array of tokens' names
$action string What to do with the mapping: add, alter or drop
$dictname string Dictionary that will process tokens given or null in case of drop action

changePassword() public méthode

Changes a role's password
public changePassword ( $rolename, $password )
$rolename The role name
$password The new password

clean() public méthode

Cleans (escapes) a string
public clean ( &$str ) : The
$str The string to clean, by reference
Résultat The cleaned string

clusterIndex() public méthode

Clusters an index
public clusterIndex ( $table = '', $index = '' )
$table The table the index is on
$index The name of the index

createAggregate() public méthode

Creates a new aggregate in the database
public createAggregate ( $name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment ) : -1
$name The name of the aggregate
$basetype The input data type of the aggregate
$sfunc The name of the state transition function for the aggregate
$stype The data type for the aggregate's state value
$ffunc The name of the final function for the aggregate
$initcond The initial setting for the state value
$sortop The sort operator for the aggregate
$comment Aggregate comment
Résultat -1

createCompositeType() public méthode

Creates a new composite type in the database
public createCompositeType ( $name, $fields, $field, $type, $array, $length, $colcomment, $typcomment ) : -1
$name The name of the type
$fields The number of fields
$field An array of field names
$type An array of field types
$array An array of '' or '[]' for each type if it's an array or not
$length An array of field lengths
$colcomment An array of comments
$typcomment Type comment
Résultat -1

createDatabase() public méthode

Creates a database
public createDatabase ( $database, $encoding, $tablespace = '', $comment = '', $template = 'template1', $lc_collate = '', $lc_ctype = '' ) : -2
$database The name of the database to create
$encoding Encoding of the database
$tablespace (optional) The tablespace name
Résultat -2

createDomain() public méthode

Creates a domain
public createDomain ( $domain, $type, $length, $array, $notnull, $default, $check )
$domain The name of the domain to create
$type The base type for the domain
$length Optional type length
$array True for array type, false otherwise
$notnull True for NOT NULL, false otherwise
$default Default value for domain
$check A CHECK constraint if there is one

createEnumType() public méthode

Creates a new enum type in the database
public createEnumType ( $name, $values, $typcomment ) : -2
$name The name of the type
$values An array of values
$typcomment Type comment
Résultat -2

createFtsConfiguration() public méthode

Creates a new FTS configuration.
public createFtsConfiguration ( string $cfgname, string $parser = '', string $template = '', string $comment = '' )
$cfgname string The name of the FTS configuration to create
$parser string The parser to be used in new FTS configuration
$template string The existing FTS configuration to be used as template for the new one
$comment string If omitted, defaults to nothing

createFtsDictionary() public méthode

Creates a new FTS dictionary or FTS dictionary template.
public createFtsDictionary ( string $dictname, boolean $isTemplate = false, string $template = '', string $lexize = '', string $init = '', string $option = '', string $comment = '' )
$dictname string The name of the FTS dictionary to create
$isTemplate boolean Flag whether we create usual dictionary or dictionary template
$template string The existing FTS dictionary to be used as template for the new one
$lexize string The name of the function, which does transformation of input word
$init string The name of the function, which initializes dictionary
$option string Usually, it stores various options required for the dictionary
$comment string If omitted, defaults to nothing

createFunction() public méthode

Creates a new function.
public createFunction ( $funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false ) : -4
$funcname The name of the function to create
$args A comma separated string of types
$returns The return type
$definition The definition for the new function
$language The language the function is written for
$flags An array of optional flags
$setof True if it returns a set, false otherwise
$cost cost the planner should use in the function execution step
$rows number of rows planner should estimate will be returned
$comment Comment for the function
$replace (optional) True if OR REPLACE, false for normal
Résultat -4

createGroup() public méthode

Creates a new group
public createGroup ( $groname, $users )
$groname The name of the group
$users An array of users to add to the group

createIndex() public méthode

Creates an index
public createIndex ( $name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently )
$name The index name
$table The table on which to add the index
$columns An array of columns that form the index or a string expression for a functional index
$type The index type
$unique True if unique, false otherwise
$where Index predicate ('' for none)
$tablespace The tablespaces ('' means none/default)

createRole() public méthode

Creates a new role
public createRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers )
$rolename The name of the role to create
$password A password for the role
$superuser Boolean whether or not the role is a superuser
$createdb Boolean whether or not the role can create databases
$createrole Boolean whether or not the role can create other roles
$inherits Boolean whether or not the role inherits the privileges from parent roles
$login Boolean whether or not the role will be allowed to login
$connlimit Number of concurrent connections the role can make
$expiry String Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
$memberof (array) Roles to which the new role will be immediately added as a new member
$members (array) Roles which are automatically added as members of the new role
$adminmembers (array) Roles which are automatically added as admin members of the new role

createRule() public méthode

Creates a rule
public createRule ( $name, $event, $table, $where, $instead, $type, $action, $replace = false ) : -1
$name The name of the new rule
$event SELECT, INSERT, UPDATE or DELETE
$table Table on which to create the rule
$where When to execute the rule, '' indicates always
$instead True if an INSTEAD rule, false otherwise
$type NOTHING for a do nothing rule, SOMETHING to use given action
$action The action to take
$replace (optional) True to replace existing rule, false otherwise
Résultat -1

createSchema() public méthode

Creates a new schema.
public createSchema ( $schemaname, $authorization = '', $comment = '' )
$schemaname The name of the schema to create
$authorization (optional) The username to create the schema for.
$comment (optional) If omitted, defaults to nothing

createSequence() public méthode

Creates a new sequence
public createSequence ( $sequence, $increment, $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue )
$sequence Sequence name
$increment The increment
$minvalue The min value
$maxvalue The max value
$startvalue The starting value
$cachevalue The cache value
$cycledvalue True if cycled, false otherwise

createTable() public méthode

Creates a new table in the database
public createTable ( $name, $fields, $field, $type, $array, $length, $notnull, $default, $withoutoids, $colcomment, $tblcomment, $tablespace, $uniquekey, $primarykey ) : -1
$name The name of the table
$fields The number of fields
$field An array of field names
$type An array of field types
$array An array of '' or '[]' for each type if it's an array or not
$length An array of field lengths
$notnull An array of not null
$default An array of default values
$withoutoids True if WITHOUT OIDS, false otherwise
$colcomment An array of comments
$tablespace The tablespace name ('' means none/default)
$uniquekey An Array indicating the fields that are unique (those indexes that are set)
$primarykey An Array indicating the field used for the primarykey (those indexes that are set)
Résultat -1

createTableLike() public méthode

Creates a new table in the database copying attribs and other properties from another table
public createTableLike ( $name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '' )
$name The name of the table
$like an array giving the schema ans the name of the table from which attribs are copying from: array( 'table' => table name, 'schema' => the schema name, )
$defaults if true, copy the defaults values as well
$constraints if true, copy the constraints as well (CHECK on table & attr)
$tablespace The tablespace name ('' means none/default)

createTablespace() public méthode

Creates a tablespace
public createTablespace ( $spcname, $spcowner, $spcloc, $comment = '' )
$spcname The name of the tablespace to create
$spcowner The owner of the tablespace. '' for current
$spcloc The directory in which to create the tablespace

createTrigger() public méthode

Creates a trigger
public createTrigger ( $tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs )
$tgname The name of the trigger to create
$table The name of the table
$tgproc The function to execute
$tgtime BEFORE or AFTER
$tgevent Event
$tgargs The function arguments

createType() public méthode

Creates a new type
public createType ( $typname, $typin, $typout, $typlen, $typdef, $typelem, $typdelim, $typbyval, $typalign, $typstorage )

createUser() public méthode

Creates a new user
public createUser ( $username, $password, $createdb, $createuser, $expiry, $groups )
$username The username of the user to create
$password A password for the user
$createdb boolean Whether or not the user can create databases
$createuser boolean Whether or not the user can create other users
$expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire

createView() public méthode

Creates a new view.
public createView ( $viewname, $definition, $replace, $comment )
$viewname The name of the view to create
$definition The definition for the new view
$replace True to replace the view, false otherwise

dbBool() public méthode

Change the value of a parameter to 't' or 'f' depending on whether it evaluates to true or false
public dbBool ( &$parameter )
$parameter the parameter

deleteRow() public méthode

Delete a row from a table
public deleteRow ( $table, $key, $schema = false )
$table The table from which to delete
$key An array mapping column => value to delete

disableTrigger() public méthode

Disables a trigger
public disableTrigger ( $tgname, $table )
$tgname The name of the trigger to disable
$table The table in which to disable the trigger

dropAggregate() public méthode

Removes an aggregate function from the database
public dropAggregate ( $aggrname, $aggrtype, $cascade )
$aggrname The name of the aggregate
$aggrtype The input data type of the aggregate
$cascade True to cascade drop, false to restrict

dropAutovacuum() public méthode

public dropAutovacuum ( $table )

dropCheckConstraint() public méthode

Drops a check constraint from a table
public dropCheckConstraint ( $table, $name ) : -4
$table The table from which to drop the check
$name The name of the check to be dropped
Résultat -4

dropColumn() public méthode

Drops a column from a table
public dropColumn ( $table, $column, $cascade )
$table The table from which to drop a column
$column The column to be dropped
$cascade True to cascade drop, false to restrict

dropColumnDefault() public méthode

Drops default value of a column
public dropColumnDefault ( $table, $column )
$table The table from which to drop
$column The column name to drop default

dropConstraint() public méthode

Removes a constraint from a relation
public dropConstraint ( $constraint, $relation, $type, $cascade )
$constraint The constraint to drop
$relation The relation from which to drop
$type The type of constraint (c, f, u or p)
$cascade True to cascade drop, false to restrict

dropDatabase() public méthode

Drops a database
public dropDatabase ( $database )
$database The name of the database to drop

dropDomain() public méthode

Drops a domain.
public dropDomain ( $domain, $cascade )
$domain The name of the domain to drop
$cascade True to cascade drop, false to restrict

dropDomainConstraint() public méthode

Drops a domain constraint
public dropDomainConstraint ( $domain, $constraint, $cascade )
$domain The domain from which to remove the constraint
$constraint The constraint to remove
$cascade True to cascade, false otherwise

dropFtsConfiguration() public méthode

Drops FTS coniguration
public dropFtsConfiguration ( $ftscfg, $cascade )
$ftscfg The configuration's name
$cascade Cascade to dependenced objects

dropFtsDictionary() public méthode

Drops FTS dictionary
public dropFtsDictionary ( $ftsdict, $cascade )
$ftsdict The dico's name
$cascade Cascade to dependenced objects

dropFunction() public méthode

Drops a function.
public dropFunction ( $function_oid, $cascade )
$function_oid The OID of the function to drop
$cascade True to cascade drop, false to restrict

dropGroup() public méthode

Removes a group
public dropGroup ( $groname )
$groname The name of the group to drop

dropGroupMember() public méthode

Removes a group member
public dropGroupMember ( $groname, $user )
$groname The name of the group
$user The name of the user to remove from the group

dropIndex() public méthode

Removes an index from the database
public dropIndex ( $index, $cascade )
$index The index to drop
$cascade True to cascade drop, false to restrict

dropOperator() public méthode

Drops an operator
public dropOperator ( $operator_oid, $cascade )
$operator_oid The OID of the operator to drop
$cascade True to cascade drop, false to restrict

dropRole() public méthode

Removes a role
public dropRole ( $rolename )
$rolename The name of the role to drop

dropRule() public méthode

Removes a rule from a table OR view
public dropRule ( $rule, $relation, $cascade )
$rule The rule to drop
$relation The relation from which to drop
$cascade True to cascade drop, false to restrict

dropSchema() public méthode

Drops a schema.
public dropSchema ( $schemaname, $cascade )
$schemaname The name of the schema to drop
$cascade True to cascade drop, false to restrict

dropSequence() public méthode

Drops a given sequence
public dropSequence ( $sequence, $cascade )
$sequence Sequence name
$cascade True to cascade drop, false to restrict

dropTable() public méthode

Removes a table from the database
public dropTable ( $table, $cascade )
$table The table to drop
$cascade True to cascade drop, false to restrict

dropTablespace() public méthode

Drops a tablespace
public dropTablespace ( $spcname )
$spcname The name of the domain to drop

dropTrigger() public méthode

Drops a trigger
public dropTrigger ( $tgname, $table, $cascade )
$tgname The name of the trigger to drop
$table The table from which to drop the trigger
$cascade True to cascade drop, false to restrict

dropType() public méthode

Drops a type.
public dropType ( $typname, $cascade )
$typname The name of the type to drop
$cascade True to cascade drop, false to restrict

dropUser() public méthode

Removes a user
public dropUser ( $username )
$username The username of the user to drop

dropView() public méthode

Drops a view.
public dropView ( $viewname, $cascade )
$viewname The name of the view to drop
$cascade True to cascade drop, false to restrict

dumpRelation() public méthode

@@ Note: Really needs to use a cursor
public dumpRelation ( $relation, $oids ) : -1
$relation The name of a relation
Résultat -1 recordset on success

editRow() public méthode

Updates a row in a table
public editRow ( $table, $vars, $nulls, $format, $types, $keyarr ) : -1
$table The table in which to update
$vars An array mapping new values for the row
$nulls An array mapping column => something if it is to be null
$format An array of the data type (VALUE or EXPRESSION)
$types An array of field types
$keyarr An array mapping column => value to update
Résultat -1

emptyTable() public méthode

Empties a table in the database
public emptyTable ( $table )
$table The table to be emptied

enableTrigger() public méthode

Enables a trigger
public enableTrigger ( $tgname, $table )
$tgname The name of the trigger to enable
$table The table in which to enable the trigger

endDump() public méthode

Ends the data object for a dump.
public endDump ( )

escapeBytea() public méthode

Escapes bytea data for display on the screen
public escapeBytea ( $data ) : Data
$data The bytea data
Résultat Data formatted for on-screen display

executeScript() public méthode

XXX: It does not handle multibyte languages properly.
public executeScript ( $name, $callback = null ) : True
$name Entry in $_FILES to use
$callback (optional) Callback function to call with each query, its result and line number.
Résultat True for general success, false on any failure.

fieldArrayClean() public méthode

Cleans (escapes) an array of field names
public fieldArrayClean ( &$arr ) : The
$arr The array to clean, by reference
Résultat The cleaned array

fieldClean() public méthode

Cleans (escapes) an object name (eg. table, field)
public fieldClean ( &$str ) : The
$str The string to clean, by reference
Résultat The cleaned string

findObject() public méthode

Searches all system catalogs to find objects that match a certain name.
public findObject ( $term, $filter ) : A
$term The search term
$filter The object type to restrict to ('' means no restriction)
Résultat A recordset

formatType() public méthode

Formats a type correctly for display. Postgres 7.0 had no 'format_type' built-in function, and hence we need to do it manually.
public formatType ( $typname, $typmod )
$typname The name of the type
$typmod The contents of the typmod field

formatValue() public méthode

Formats a value or expression for sql purposes
public formatValue ( $type, $format, $value ) : The
$type The type of the field
$format VALUE or EXPRESSION
$value The actual value entered in the field. Can be NULL
Résultat The suitably quoted and escaped value.

getAggregate() public méthode

Gets all information for an aggregate
public getAggregate ( $name, $basetype ) : A
$name The name of the aggregate
$basetype The input data type of the aggregate
Résultat A recordset

getAggregates() public méthode

Gets all aggregates
public getAggregates ( ) : A
Résultat A recordset

getAttributeNames() public méthode

Given an array of attnums and a relation, returns an array mapping attribute number to attribute name.
public getAttributeNames ( $table, $atts ) : -2
$table The table to get attributes for
$atts An array of attribute numbers
Résultat -2 array mapping attnum to attname

getAutovacuum() public méthode

Returns all autovacuum global configuration
public getAutovacuum ( ) : associative
Résultat associative array array( param => value, ...)

getCasts() public méthode

Returns a list of all casts in the database
public getCasts ( ) : All
Résultat All casts

getChangeUserSQL() public méthode

Returns the SQL for changing the current user
public getChangeUserSQL ( $user ) : The
$user The user to change to
Résultat The SQL

getConstraints() public méthode

Returns a list of all constraints on a table
public getConstraints ( $table ) : A
$table The table to find rules for
Résultat A recordset

getConstraintsWithFields() public méthode

Returns a list of all constraints on a table, including constraint name, definition, related col and referenced namespace, table and col if needed
public getConstraintsWithFields ( $table ) : a
$table the table where we are looking for fk
Résultat a recordset

getConversions() public méthode

Returns a list of all conversions in the database
public getConversions ( ) : All
Résultat All conversions

getDatabase() public méthode

Return all information about a particular database
public getDatabase ( $database ) : The
$database The name of the database to retrieve
Résultat The database info

getDatabaseComment() public méthode

Return the database comment of a db from the shared description table
public getDatabaseComment ( string $database ) : recordset
$database string the name of the database to get the comment for
Résultat recordset of the db comment info

getDatabaseEncoding() public méthode

Returns the current database encoding
public getDatabaseEncoding ( ) : The
Résultat The encoding. eg. SQL_ASCII, UTF-8, etc.

getDatabaseOwner() public méthode

Return the database owner of a db
public getDatabaseOwner ( string $database ) : recordset
$database string the name of the database to get the owner for
Résultat recordset of the db owner info

getDatabases() public méthode

Return all database available on the server
public getDatabases ( $currentdatabase = NULL ) : A
$currentdatabase database name that should be on top of the resultset
Résultat A list of databases, sorted alphabetically

getDefaultWithOid() public méthode

Returns the current default_with_oids setting
public getDefaultWithOid ( ) : default_with_oids
Résultat default_with_oids setting

getDomain() public méthode

Gets all information for a single domain
public getDomain ( $domain ) : A
$domain The name of the domain to fetch
Résultat A recordset

getDomainConstraints() public méthode

Get domain constraints
public getDomainConstraints ( $domain ) : A
$domain The name of the domain whose constraints to fetch
Résultat A recordset

getDomains() public méthode

Return all domains in current schema. Excludes domain constraints.
public getDomains ( ) : All
Résultat All tables, sorted alphabetically

getEnumValues() public méthode

Get defined values for a given enum
public getEnumValues ( $name ) : A
Résultat A recordset

getFtsConfigurationByName() public méthode

Return all information related to a FTS configuration
public getFtsConfigurationByName ( $ftscfg ) : FTS
$ftscfg The name of the FTS configuration
Résultat FTS configuration information

getFtsConfigurationMap() public méthode

Returns the map of FTS configuration given (list of mappings (tokens) and their processing dictionaries)
public getFtsConfigurationMap ( string $ftscfg ) : RecordSet
$ftscfg string Name of the FTS configuration
Résultat RecordSet

getFtsConfigurations() public méthode

Returns available FTS configurations
public getFtsConfigurations ( $all = true ) : A
$all if false, returns schema qualified FTS confs
Résultat A recordset

getFtsDictionaries() public méthode

Returns FTS dictionaries available
public getFtsDictionaries ( $all = true )
$all if false, return only Dics from the current schema

getFtsDictionaryByName() public méthode

Return all information relating to a FTS dictionary
public getFtsDictionaryByName ( $ftsdict ) : RecordSet
$ftsdict The name of the FTS dictionary
Résultat RecordSet of FTS dictionary information

getFtsDictionaryTemplates() public méthode

Returns all FTS dictionary templates available

getFtsMappingByName() public méthode

Return all information related to a given FTS configuration's mapping
public getFtsMappingByName ( $ftscfg, $mapping ) : FTS
$ftscfg The name of the FTS configuration
$mapping The name of the mapping
Résultat FTS configuration information

getFtsMappings() public méthode

Return list of FTS mappings possible for given parser (specified by given configuration since configuration can only have 1 parser)
public getFtsMappings ( $ftscfg )
$ftscfg The config's name that use the parser

getFtsParsers() public méthode

Returns FTS parsers available
public getFtsParsers ( $all = true ) : RecordSet
$all if false, return only Parsers from the current schema
Résultat RecordSet

getFunction() public méthode

Returns all details for a particular function
public getFunction ( $function_oid ) : Function
Résultat Function info

getFunctionProperties() public méthode

Returns an array containing a function's properties
public getFunctionProperties ( $f ) : An
$f The array of data for the function
Résultat An array containing the properties

getFunctions() public méthode

Returns a list of all functions in the database
public getFunctions ( $all = false, $type = null ) : All
$all If true, will find all available functions, if false just those in search path
$type If not null, will find all functions with return value = type
Résultat All functions

getGroup() public méthode

Return users in a specific group
public getGroup ( $groname ) : All
$groname The name of the group
Résultat All users in the group

getGroups() public méthode

Returns all groups in the database cluser
public getGroups ( ) : All
Résultat All groups

getHelp() public méthode

Fetch a URL (or array of URLs) for a given help page.
public getHelp ( $help )

getHelpPages() public méthode

public getHelpPages ( )

getIndexes() public méthode

Grabs a list of indexes for a table
public getIndexes ( $table = '', $unique = false ) : A
$table The name of a table whose indexes to retrieve
$unique Only get unique/pk indexes
Résultat A recordset

getLanguages() public méthode

Gets all languages
public getLanguages ( $all = false ) : A
$all True to get all languages, regardless of show_system
Résultat A recordset

getLinkingKeys() public méthode

A function for getting all columns linked by foreign keys given a group of tables
public getLinkingKeys ( $tables ) : -1
$tables multi dimensional assoc array that holds schema and table name
Résultat -1 recordset of linked tables and columns

getLocks() public méthode

Returns table locks information in the current database
public getLocks ( ) : A
Résultat A recordset

getMemberOf() public méthode

Returns all role names which the role belongs to
public getMemberOf ( $rolename ) : All
$rolename The role name
Résultat All role names

getMembers() public méthode

Returns all role names that are members of a role
public getMembers ( $rolename, $admin = 'f' ) : All
$rolename The role name
$admin (optional) Find only admin members
Résultat All role names

getOpClasses() public méthode

Gets all opclasses
public getOpClasses ( ) : A
Résultat A recordset

getOperator() public méthode

Returns all details for a particular operator
public getOperator ( $operator_oid ) : Function
$operator_oid The oid of the operator
Résultat Function info

getOperators() public méthode

Returns a list of all operators in the database
public getOperators ( ) : All
Résultat All operators

getPreparedXacts() public méthode

Returns prepared transactions information
public getPreparedXacts ( $database = null ) : A
$database (optional) Find only prepared transactions executed in a specific database
Résultat A recordset

getPrivileges() public méthode

Grabs an array of users and their privileges for an object, given its type.
public getPrivileges ( $object, $type, $table = null ) : -3
$object The name of the object whose privileges are to be retrieved
$type The type of the object (eg. database, schema, relation, function or language)
$table Optional, column's table if type = column
Résultat -3 array

getProcesses() public méthode

Returns all available process information.
public getProcesses ( $database = null ) : A
$database (optional) Find only connections to specified database
Résultat A recordset

getReferrers() public méthode

Finds the foreign keys that refer to the specified table
public getReferrers ( $table ) : A
$table The table to find referrers for
Résultat A recordset

getRole() public méthode

Returns information about a single role
public getRole ( $rolename ) : The
$rolename The name of the role to retrieve
Résultat The role's data

getRoles() public méthode

Returns all roles in the database cluster
public getRoles ( $rolename = '' ) : All
$rolename (optional) The role name to exclude from the select
Résultat All roles

getRowIdentifier() public méthode

Get the fields for uniquely identifying a row in a table
public getRowIdentifier ( $table ) : -1
$table The table for which to retrieve the identifier
Résultat -1 array mapping attribute number to attribute name, empty for no identifiers

getRules() public méthode

Returns a list of all rules on a table OR view
public getRules ( $table ) : A
$table The table to find rules for
Résultat A recordset

getSchemaByName() public méthode

Return all information relating to a schema
public getSchemaByName ( $schema ) : Schema
$schema The name of the schema
Résultat Schema information

getSchemas() public méthode

Return all schemas in the current database.
public getSchemas ( ) : All
Résultat All schemas, sorted alphabetically

getSearchPath() public méthode

Return the current schema search path
public getSearchPath ( ) : Array
Résultat Array of schema names

getSelectSQL() public méthode

Generates the SQL for the 'select' function
public getSelectSQL ( $table, $show, $values, $ops, $orderby = [] ) : The
$table The table from which to select
$show An array of columns to show. Empty array means all columns.
$values An array mapping columns to values
$ops An array of the operators to use
$orderby (optional) An array of column numbers or names (one based) mapped to sort direction (asc or desc or '' or null) to order by
Résultat The SQL query

getSequence() public méthode

Returns properties of a single sequence
public getSequence ( $sequence ) : A
$sequence Sequence name
Résultat A recordset

getSequences() public méthode

Returns all sequences in the current database
public getSequences ( $all = false ) : A
Résultat A recordset

getStatsDatabase() public méthode

Fetches statistics for a database
public getStatsDatabase ( $database ) : A
$database The database to fetch stats for
Résultat A recordset

getStatsIndexIO() public méthode

Fetches I/0 statistics for all indexes on a table
public getStatsIndexIO ( $table ) : A
$table The table to fetch index stats for
Résultat A recordset

getStatsIndexTuples() public méthode

Fetches tuple statistics for all indexes on a table
public getStatsIndexTuples ( $table ) : A
$table The table to fetch index stats for
Résultat A recordset

getStatsTableIO() public méthode

Fetches I/0 statistics for a table
public getStatsTableIO ( $table ) : A
$table The table to fetch stats for
Résultat A recordset

getStatsTableTuples() public méthode

Fetches tuple statistics for a table
public getStatsTableTuples ( $table ) : A
$table The table to fetch stats for
Résultat A recordset

getTable() public méthode

Returns table information
public getTable ( $table ) : A
$table The name of the table
Résultat A recordset

getTableAttributes() public méthode

Retrieve the attribute definition of a table
public getTableAttributes ( $table, $field = '' ) : All
$table The name of the table
$field (optional) The name of a field to return
Résultat All attributes in order

getTableAutovacuum() public méthode

Returns all available autovacuum per table information.
public getTableAutovacuum ( $table = '' ) : A
$table if given, return autovacuum info for the given table or return all informations for all table
Résultat A recordset

getTableChildren() public méthode

Finds the names and schemas of child tables
public getTableChildren ( $table ) : A
$table The table to find the children for
Résultat A recordset

getTableDefPrefix() public méthode

Returns the SQL definition for the table.
public getTableDefPrefix ( $table, $clean = false ) : null
$table The table to define
$clean True to issue drop command, false otherwise
Résultat null string containing the formatted SQL code

getTableDefSuffix() public méthode

Returns extra table definition information that is most usefully dumped after the table contents for speed and efficiency reasons
public getTableDefSuffix ( $table ) : null
$table The table to define
Résultat null string containing the formatted SQL code

getTableParents() public méthode

Finds the names and schemas of parent tables (in order)
public getTableParents ( $table ) : A
$table The table to find the parents for
Résultat A recordset

getTables() public méthode

Return all tables in current database (and schema)
public getTables ( $all = false ) : All
$all True to fetch all tables, false for just in current schema
Résultat All tables, sorted alphabetically

getTablespace() public méthode

Retrieves a tablespace's information
public getTablespace ( $spcname ) : A
Résultat A recordset

getTablespaces() public méthode

Retrieves information for all tablespaces
public getTablespaces ( $all = false ) : A
$all Include all tablespaces (necessary when moving objects back to the default space)
Résultat A recordset

getTrigger() public méthode

Grabs a single trigger
public getTrigger ( $table, $trigger ) : A
$table The name of a table whose triggers to retrieve
$trigger The name of the trigger to retrieve
Résultat A recordset

getTriggerDef() public méthode

Note: Only needed for pre-7.4 servers, this function is deprecated
public getTriggerDef ( $trigger ) : The
$trigger An array containing fields from the trigger table
Résultat The trigger definition string

getTriggerFunctions() public méthode

Returns a list of all functions that can be used in triggers
public getTriggerFunctions ( )

getTriggers() public méthode

Grabs a list of triggers on a table
public getTriggers ( $table = '' ) : A
$table The name of a table whose triggers to retrieve
Résultat A recordset

getType() public méthode

Returns all details for a particular type
public getType ( $typname ) : Type
$typname The name of the view to retrieve
Résultat Type info

getTypes() public méthode

Returns a list of all types in the database
public getTypes ( $all = false, $tabletypes = false, $domains = false ) : A
$all If true, will find all available types, if false just those in search path
$tabletypes If true, will include table types
$domains If true, will include domains
Résultat A recordet

getUser() public méthode

Returns information about a single user
public getUser ( $username ) : The
$username The username of the user to retrieve
Résultat The user's data

getUsers() public méthode

Returns all users in the database cluster
public getUsers ( ) : All
Résultat All users

getVariables() public méthode

Returns all available variable information.
public getVariables ( ) : A
Résultat A recordset

getView() public méthode

Returns all details for a particular view
public getView ( $view ) : View
$view The name of the view to retrieve
Résultat View info

getViews() public méthode

Returns a list of all views in the database
public getViews ( ) : All
Résultat All views

grantRole() public méthode

Grants membership in a role
public grantRole ( $role, $rolename, $admin )
$role The name of the target role
$rolename The name of the role that will belong to the target role
$admin (optional) Flag to grant the admin option

hasAggregateSortOp() public méthode

Capabilities
public hasAggregateSortOp ( )

hasAlterAggregate() public méthode

public hasAlterAggregate ( )

hasAlterColumnType() public méthode

public hasAlterColumnType ( )

hasAlterDatabase() public méthode

public hasAlterDatabase ( )

hasAlterDatabaseOwner() public méthode

hasAlterDatabaseRename() public méthode

hasAlterDomains() public méthode

public hasAlterDomains ( )

hasAlterSchema() public méthode

public hasAlterSchema ( )

hasAlterSchemaOwner() public méthode

public hasAlterSchemaOwner ( )

hasAlterSequenceSchema() public méthode

hasAlterSequenceStart() public méthode

hasAlterTableSchema() public méthode

public hasAlterTableSchema ( )

hasAutovacuum() public méthode

public hasAutovacuum ( )

hasByteaHexDefault() public méthode

public hasByteaHexDefault ( )

hasConcurrentIndexBuild() public méthode

hasCreateFieldWithConstraints() public méthode

hasCreateTableLike() public méthode

public hasCreateTableLike ( )

hasCreateTableLikeWithConstraints() public méthode

hasCreateTableLikeWithIndexes() public méthode

hasDatabaseCollation() public méthode

hasDisableTriggers() public méthode

public hasDisableTriggers ( )

hasDomainConstraints() public méthode

hasEnumTypes() public méthode

public hasEnumTypes ( )

hasFTS() public méthode

public hasFTS ( )

hasForceReindex() public méthode

public hasForceReindex ( )

hasFunctionAlterOwner() public méthode

hasFunctionAlterSchema() public méthode

hasFunctionCosting() public méthode

public hasFunctionCosting ( )

hasFunctionGUC() public méthode

public hasFunctionGUC ( )

hasGrantOption() public méthode

public hasGrantOption ( )

hasMagicTypes() public méthode

public hasMagicTypes ( )

hasNamedParams() public méthode

public hasNamedParams ( )

hasObjectID() public méthode

Checks to see whether or not a table has a unique id column
public hasObjectID ( $table ) : null
$table The table name
Résultat null if it has a unique id, false otherwise

hasPrepare() public méthode

public hasPrepare ( )

hasPreparedXacts() public méthode

public hasPreparedXacts ( )

hasQueryCancel() public méthode

public hasQueryCancel ( )

hasQueryKill() public méthode

public hasQueryKill ( )

hasReadOnlyQueries() public méthode

public hasReadOnlyQueries ( )

hasRecluster() public méthode

public hasRecluster ( )

hasRoles() public méthode

public hasRoles ( )

hasServerAdminFuncs() public méthode

public hasServerAdminFuncs ( )

hasSharedComments() public méthode

public hasSharedComments ( )

hasTablespaces() public méthode

public hasTablespaces ( )

hasUserRename() public méthode

public hasUserRename ( )

hasUserSignals() public méthode

public hasUserSignals ( )

hasVirtualTransactionId() public méthode

insertRow() public méthode

Adds a new row to a table
public insertRow ( $table, $fields, $values, $nulls, $format, $types ) : -1
$table The table in which to insert
$fields Array of given field in values
$values Array of new values for the row
$nulls An array mapping column => something if it is to be null
$format An array of the data type (VALUE or EXPRESSION)
$types An array of field types
Résultat -1

isSuperUser() public méthode

Determines whether or not a user is a super user
public isSuperUser ( $username = '' ) : True
$username The username of the user
Résultat True if is a super user, false otherwise

nextvalSequence() public méthode

Execute nextval on a given sequence
public nextvalSequence ( $sequence ) : -1
$sequence Sequence name
Résultat -1

phpBool() public méthode

Change a parameter from 't' or 'f' to a boolean, (others evaluate to false)
public phpBool ( $parameter )
$parameter the parameter

printField() public méthode

Outputs the HTML code for a particular field
public printField ( $name, $value, $type, $extras = [] )
$name The name to give the field
$value The value of the field. Note this could be 'numeric(7,2)' sort of thing...
$type The database type of the field
$extras An array of attributes name as key and attributes' values as value

reindex() public méthode

Rebuild indexes
public reindex ( $type, $name, $force = false )
$type 'DATABASE' or 'TABLE' or 'INDEX'
$name The name of the specific database, table, or index to be reindexed
$force If true, recreates indexes forcedly in PostgreSQL 7.0-7.1, forces rebuild of system indexes in 7.2-7.3, ignored in >=7.4

renameAggregate() public méthode

Renames an aggregate function
public renameAggregate ( $aggrschema, $aggrname, $aggrtype, $newaggrname )
$aggrname The actual name of the aggregate
$aggrtype The actual input data type of the aggregate
$newaggrname The new name of the aggregate

renameColumn() public méthode

Renames a column in a table
public renameColumn ( $table, $column, $newName )
$table The table containing the column to be renamed
$column The column to be renamed
$newName The new name for the column

renameRole() public méthode

Renames a role
public renameRole ( $rolename, $newrolename )
$rolename The name of the role to rename
$newrolename The new name of the role

renameUser() public méthode

Renames a user
public renameUser ( $username, $newname )
$username The username of the user to rename
$newname The new name of the user

resetSequence() public méthode

Resets a given sequence to min value of sequence
public resetSequence ( $sequence ) : -1
$sequence Sequence name
Résultat -1

restartSequence() public méthode

Restart a given sequence to its start value
public restartSequence ( $sequence ) : -1
$sequence Sequence name
Résultat -1

revokeRole() public méthode

Revokes membership in a role
public revokeRole ( $role, $rolename, $admin, $type = 'RESTRICT' )
$role The name of the target role
$rolename The name of the role that will not belong to the target role
$admin (optional) Flag to revoke only the admin option
$type (optional) Type of revoke: RESTRICT | CASCADE

saveAutovacuum() public méthode

Returns all available autovacuum per table information.
public saveAutovacuum ( $table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, $anascalefactor, $vaccostdelay, $vaccostlimit ) : A
Résultat A recordset

sendSignal() public méthode

Sends a cancel or kill command to a process
public sendSignal ( $pid, $signal ) : -1
$pid The ID of the backend process
$signal 'CANCEL'
Résultat -1

setColumnDefault() public méthode

Sets default value of a column
public setColumnDefault ( $table, $column, $default )
$table The table from which to drop
$column The column name to set
$default The new default value

setColumnNull() public méthode

Sets whether or not a column can contain NULLs
public setColumnNull ( $table, $column, $state )
$table The table that contains the column
$column The column to alter
$state True to set null, false to set not null

setComment() public méthode

Sets the comment for an object in the database
public setComment ( $obj_type, $obj_name, $table, $comment, $basetype = NULL )
$obj_type One of 'TABLE' | 'COLUMN' | 'VIEW' | 'SCHEMA' | 'SEQUENCE' | 'TYPE' | 'FUNCTION' | 'AGGREGATE'
$obj_name The name of the object for which to attach a comment.
$table Name of table that $obj_name belongs to. Ignored unless $obj_type is 'TABLE' or 'COLUMN'.
$comment The comment to add.

setFunction() public méthode

Updates (replaces) a function.
public setFunction ( $function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $funcown, $newown, $funcschema, $newschema, $cost, $rows, $comment ) : -7
$function_oid The OID of the function
$funcname The name of the function to create
$newname The new name for the function
$args The array of argument types
$returns The return type
$definition The definition for the new function
$language The language the function is written for
$flags An array of optional flags
$setof True if returns a set, false otherwise
$comment The comment on the function
Résultat -7

setPrivileges() public méthode

Grants a privilege to a user, group or public
public setPrivileges ( $mode, $type, $object, $public, $usernames, $groupnames, $privileges, $grantoption, $cascade, $table ) : -4
$mode 'GRANT' or 'REVOKE';
$type The type of object
$object The name of the object
$public True to grant to public, false otherwise
$usernames The array of usernames to grant privs to.
$groupnames The array of group names to grant privs to.
$privileges The array of privileges to grant (eg. ('SELECT', 'ALL PRIVILEGES', etc.) )
$grantoption True if has grant option, false otherwise
$cascade True for cascade revoke, false otherwise
$table the column's table if type=column
Résultat -4

setRenameRole() public méthode

Adjusts a role's info and renames it
public setRenameRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold, $newrolename ) : -3
$rolename The name of the role to adjust
$password A password for the role
$superuser Boolean whether or not the role is a superuser
$createdb Boolean whether or not the role can create databases
$createrole Boolean whether or not the role can create other roles
$inherits Boolean whether or not the role inherits the privileges from parent roles
$login Boolean whether or not the role will be allowed to login
$connlimit Number of concurrent connections the role can make
$expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
$memberof (array) Roles to which the role will be immediately added as a new member
$members (array) Roles which are automatically added as members of the role
$adminmembers (array) Roles which are automatically added as admin members of the role
$memberofold (array) Original roles whose the role belongs to
$membersold (array) Original roles that are members of the role
$adminmembersold (array) Original roles that are admin members of the role
$newrolename The new name of the role
Résultat -3

setRenameUser() public méthode

Adjusts a user's info and renames the user
public setRenameUser ( $username, $password, $createdb, $createuser, $expiry, $newname ) : -3
$username The username of the user to modify
$password A new password for the user
$createdb boolean Whether or not the user can create databases
$createuser boolean Whether or not the user can create other users
$expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire.
$newname The new name of the user
Résultat -3

setRole() public méthode

Adjusts a role's info
public setRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold )
$rolename The name of the role to adjust
$password A password for the role
$superuser Boolean whether or not the role is a superuser
$createdb Boolean whether or not the role can create databases
$createrole Boolean whether or not the role can create other roles
$inherits Boolean whether or not the role inherits the privileges from parent roles
$login Boolean whether or not the role will be allowed to login
$connlimit Number of concurrent connections the role can make
$expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
$memberof (array) Roles to which the role will be immediately added as a new member
$members (array) Roles which are automatically added as members of the role
$adminmembers (array) Roles which are automatically added as admin members of the role
$memberofold (array) Original roles whose the role belongs to
$membersold (array) Original roles that are members of the role
$adminmembersold (array) Original roles that are admin members of the role

setRule() public méthode

Edits a rule on a table OR view
public setRule ( $name, $event, $table, $where, $instead, $type, $action ) : -1
$name The name of the new rule
$event SELECT, INSERT, UPDATE or DELETE
$table Table on which to create the rule
$where When to execute the rule, '' indicates always
$instead True if an INSTEAD rule, false otherwise
$type NOTHING for a do nothing rule, SOMETHING to use given action
$action The action to take
Résultat -1

setSchema() public méthode

Sets the current working schema. Will also set Class variable.
public setSchema ( $schema )
$schema The the name of the schema to work in

setSearchPath() public méthode

Sets the current schema search path
public setSearchPath ( $paths ) : -2
$paths An array of schemas in required search order
Résultat -2

setUser() public méthode

Adjusts a user's info
public setUser ( $username, $password, $createdb, $createuser, $expiry )
$username The username of the user to modify
$password A new password for the user
$createdb boolean Whether or not the user can create databases
$createuser boolean Whether or not the user can create other users
$expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire.

setView() public méthode

Updates a view.
public setView ( $viewname, $definition, $comment ) : -3
$viewname The name fo the view to update
$definition The new definition for the view
Résultat -3

setvalSequence() public méthode

Execute setval on a given sequence
public setvalSequence ( $sequence, $nextvalue ) : -1
$sequence Sequence name
$nextvalue The next value
Résultat -1

updateFtsConfiguration() public méthode

Alters FTS configuration
public updateFtsConfiguration ( $cfgname, $comment, $name )
$cfgname The conf's name
$comment A comment on for the conf
$name The new conf name

updateFtsDictionary() public méthode

Alters FTS dictionary or dictionary template
public updateFtsDictionary ( $dictname, $comment, $name )
$dictname The dico's name
$comment The comment
$name The new dico's name

updateSchema() public méthode

Updates a schema.
public updateSchema ( $schemaname, $comment, $name, $owner )
$schemaname The name of the schema to drop
$comment The new comment for this schema
$owner The new owner for this schema

vacuumDB() public méthode

Vacuums a database
public vacuumDB ( $table = '', $analyze = false, $full = false, $freeze = false )
$table The table to vacuum
$analyze If true, also does analyze
$full If true, selects "full" vacuum
$freeze If true, selects aggressive "freezing" of tuples

Property Details

$_maxNameLen public_oe property

Max object name length
public $_maxNameLen

$_schema public_oe property

Store the current schema
public $_schema

$codemap public_oe property

encoding name is the same as its database encoding name.
public $codemap

$defaultprops public_oe property

public $defaultprops

$extraTypes public_oe property

Extra "magic" types. BIGSERIAL was added in PostgreSQL 7.2.
public $extraTypes

$fkactions public_oe property

Foreign key stuff. First element MUST be the default.
public $fkactions

$fkdeferrable public_oe property

public $fkdeferrable

$fkinitial public_oe property

public $fkinitial

$fkmatches public_oe property

public $fkmatches

$funcprops public_oe property

Function properties
public $funcprops

$help_base public_oe property

Default help URL
public $help_base

$help_page public_oe property

Help sub pages
public $help_page

$id public_oe property

Name of id column
public $id

$joinOps public_oe property

Supported join operations for use with view wizard
public $joinOps

$langmap public_oe property

Map of internal language name to syntax highlighting name
public $langmap

$major_version public_oe property

public $major_version

$predefined_size_types public_oe property

Predefined size types
public $predefined_size_types

$privlist public_oe property

of objects.
public $privlist

$privmap public_oe property

refer to.
public $privmap

$rule_events public_oe property

Rule action types
public $rule_events

$selectOps public_oe property

Select operators
public $selectOps

$triggerEvents public_oe property

Array of allowed trigger events
public $triggerEvents

$triggerExecTimes public_oe property

When to execute the trigger
public $triggerExecTimes

$triggerFrequency public_oe property

How often to execute the trigger
public $triggerFrequency

$typAlignDef public_oe property

The default type alignment
public $typAlignDef

$typAligns public_oe property

Array of allowed type alignments
public $typAligns

$typIndexDef public_oe property

Default index type
public $typIndexDef

$typIndexes public_oe property

Array of allowed index types
public $typIndexes

$typStorageDef public_oe property

The default type storage
public $typStorageDef

$typStorages public_oe property

Array of allowed type storage attributes
public $typStorages