PHP 클래스 Postgres, phppgadmin

상속: extends ADODB_base
파일 보기 프로젝트 열기: phppgadmin/phppgadmin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_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

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
_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

비공개 메소드들

메소드 설명
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

메소드 상세

Postgres() 공개 메소드

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

_alterSequence() 보호된 메소드

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
리턴 -7

_alterTable() 보호된 메소드

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)
리턴 -7

_alterView() 보호된 메소드

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
리턴 -6

_encryptPassword() 공개 메소드

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

_parseACL() 공개 메소드

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

addCheckConstraint() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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
리턴 -1

addGroupMember() 공개 메소드

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() 공개 메소드

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.
리턴 -1

addUniqueKey() 공개 메소드

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.
리턴 -1

alreadyClustered() 공개 메소드

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

alterAggregate() 공개 메소드

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
리턴 -4

alterColumn() 공개 메소드

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
리턴 -6

alterDatabase() 공개 메소드

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
리턴 -4

alterDatabaseOwner() 공개 메소드

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
리턴 integer 0 on success

alterDatabaseRename() 공개 메소드

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
리턴 integer 0 on success

alterDomain() 공개 메소드

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
리턴 -4

alterSequence() 공개 메소드

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
리턴 -2

alterSequenceName() 공개 메소드

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

alterSequenceOwner() 공개 메소드

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

alterSequenceProps() 공개 메소드

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() 공개 메소드

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

alterTable() 공개 메소드

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)
리턴 -2

alterTableName() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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
리턴 -4

alterTrigger() 공개 메소드

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() 공개 메소드

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
리턴 -2

alterViewName() 공개 메소드

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

alterViewOwner() 공개 메소드

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

alterViewSchema() 공개 메소드

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

analyzeDB() 공개 메소드

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

arrayClean() 공개 메소드

Cleans (escapes) an array
public arrayClean ( &$arr ) : The
$arr The array to clean, by reference
리턴 The cleaned array

beginDump() 공개 메소드

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

browseQuery() 공개 메소드

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
리턴 -5 recordset on success

browseQueryCount() 공개 메소드

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
리턴 -1 count of rows

browseRow() 공개 메소드

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
리턴 A recordset

changeAggregateOwner() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

clean() 공개 메소드

Cleans (escapes) a string
public clean ( &$str ) : The
$str The string to clean, by reference
리턴 The cleaned string

clusterIndex() 공개 메소드

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

createAggregate() 공개 메소드

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
리턴 -1

createCompositeType() 공개 메소드

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
리턴 -1

createDatabase() 공개 메소드

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
리턴 -2

createDomain() 공개 메소드

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() 공개 메소드

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
리턴 -2

createFtsConfiguration() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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
리턴 -4

createGroup() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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
리턴 -1

createSchema() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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)
리턴 -1

createTableLike() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

createUser() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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 dropAutovacuum ( $table )

dropCheckConstraint() 공개 메소드

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
리턴 -4

dropColumn() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

dropDomain() 공개 메소드

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

dropDomainConstraint() 공개 메소드

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() 공개 메소드

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

dropFtsDictionary() 공개 메소드

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

dropFunction() 공개 메소드

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() 공개 메소드

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

dropGroupMember() 공개 메소드

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() 공개 메소드

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

dropOperator() 공개 메소드

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() 공개 메소드

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

dropRule() 공개 메소드

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() 공개 메소드

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

dropSequence() 공개 메소드

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

dropTable() 공개 메소드

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

dropTablespace() 공개 메소드

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

dropTrigger() 공개 메소드

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() 공개 메소드

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

dropUser() 공개 메소드

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

dropView() 공개 메소드

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

dumpRelation() 공개 메소드

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

editRow() 공개 메소드

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
리턴 -1

emptyTable() 공개 메소드

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

enableTrigger() 공개 메소드

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() 공개 메소드

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

escapeBytea() 공개 메소드

Escapes bytea data for display on the screen
public escapeBytea ( $data ) : Data
$data The bytea data
리턴 Data formatted for on-screen display

executeScript() 공개 메소드

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.
리턴 True for general success, false on any failure.

fieldArrayClean() 공개 메소드

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

fieldClean() 공개 메소드

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

findObject() 공개 메소드

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)
리턴 A recordset

formatType() 공개 메소드

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() 공개 메소드

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
리턴 The suitably quoted and escaped value.

getAggregate() 공개 메소드

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
리턴 A recordset

getAggregates() 공개 메소드

Gets all aggregates
public getAggregates ( ) : A
리턴 A recordset

getAttributeNames() 공개 메소드

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
리턴 -2 array mapping attnum to attname

getAutovacuum() 공개 메소드

Returns all autovacuum global configuration
public getAutovacuum ( ) : associative
리턴 associative array array( param => value, ...)

getCasts() 공개 메소드

Returns a list of all casts in the database
public getCasts ( ) : All
리턴 All casts

getChangeUserSQL() 공개 메소드

Returns the SQL for changing the current user
public getChangeUserSQL ( $user ) : The
$user The user to change to
리턴 The SQL

getConstraints() 공개 메소드

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

getConstraintsWithFields() 공개 메소드

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
리턴 a recordset

getConversions() 공개 메소드

Returns a list of all conversions in the database
public getConversions ( ) : All
리턴 All conversions

getDatabase() 공개 메소드

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

getDatabaseComment() 공개 메소드

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
리턴 recordset of the db comment info

getDatabaseEncoding() 공개 메소드

Returns the current database encoding
public getDatabaseEncoding ( ) : The
리턴 The encoding. eg. SQL_ASCII, UTF-8, etc.

getDatabaseOwner() 공개 메소드

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

getDatabases() 공개 메소드

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

getDefaultWithOid() 공개 메소드

Returns the current default_with_oids setting
public getDefaultWithOid ( ) : default_with_oids
리턴 default_with_oids setting

getDomain() 공개 메소드

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

getDomainConstraints() 공개 메소드

Get domain constraints
public getDomainConstraints ( $domain ) : A
$domain The name of the domain whose constraints to fetch
리턴 A recordset

getDomains() 공개 메소드

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

getEnumValues() 공개 메소드

Get defined values for a given enum
public getEnumValues ( $name ) : A
리턴 A recordset

getFtsConfigurationByName() 공개 메소드

Return all information related to a FTS configuration
public getFtsConfigurationByName ( $ftscfg ) : FTS
$ftscfg The name of the FTS configuration
리턴 FTS configuration information

getFtsConfigurationMap() 공개 메소드

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
리턴 RecordSet

getFtsConfigurations() 공개 메소드

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

getFtsDictionaries() 공개 메소드

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

getFtsDictionaryByName() 공개 메소드

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

getFtsDictionaryTemplates() 공개 메소드

Returns all FTS dictionary templates available

getFtsMappingByName() 공개 메소드

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
리턴 FTS configuration information

getFtsMappings() 공개 메소드

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() 공개 메소드

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

getFunction() 공개 메소드

Returns all details for a particular function
public getFunction ( $function_oid ) : Function
리턴 Function info

getFunctionProperties() 공개 메소드

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

getFunctions() 공개 메소드

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
리턴 All functions

getGroup() 공개 메소드

Return users in a specific group
public getGroup ( $groname ) : All
$groname The name of the group
리턴 All users in the group

getGroups() 공개 메소드

Returns all groups in the database cluser
public getGroups ( ) : All
리턴 All groups

getHelp() 공개 메소드

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

getHelpPages() 공개 메소드

public getHelpPages ( )

getIndexes() 공개 메소드

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
리턴 A recordset

getLanguages() 공개 메소드

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

getLinkingKeys() 공개 메소드

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
리턴 -1 recordset of linked tables and columns

getLocks() 공개 메소드

Returns table locks information in the current database
public getLocks ( ) : A
리턴 A recordset

getMemberOf() 공개 메소드

Returns all role names which the role belongs to
public getMemberOf ( $rolename ) : All
$rolename The role name
리턴 All role names

getMembers() 공개 메소드

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
리턴 All role names

getOpClasses() 공개 메소드

Gets all opclasses
public getOpClasses ( ) : A
리턴 A recordset

getOperator() 공개 메소드

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

getOperators() 공개 메소드

Returns a list of all operators in the database
public getOperators ( ) : All
리턴 All operators

getPreparedXacts() 공개 메소드

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

getPrivileges() 공개 메소드

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
리턴 -3 array

getProcesses() 공개 메소드

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

getReferrers() 공개 메소드

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

getRole() 공개 메소드

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

getRoles() 공개 메소드

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

getRowIdentifier() 공개 메소드

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

getRules() 공개 메소드

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

getSchemaByName() 공개 메소드

Return all information relating to a schema
public getSchemaByName ( $schema ) : Schema
$schema The name of the schema
리턴 Schema information

getSchemas() 공개 메소드

Return all schemas in the current database.
public getSchemas ( ) : All
리턴 All schemas, sorted alphabetically

getSearchPath() 공개 메소드

Return the current schema search path
public getSearchPath ( ) : Array
리턴 Array of schema names

getSelectSQL() 공개 메소드

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
리턴 The SQL query

getSequence() 공개 메소드

Returns properties of a single sequence
public getSequence ( $sequence ) : A
$sequence Sequence name
리턴 A recordset

getSequences() 공개 메소드

Returns all sequences in the current database
public getSequences ( $all = false ) : A
리턴 A recordset

getStatsDatabase() 공개 메소드

Fetches statistics for a database
public getStatsDatabase ( $database ) : A
$database The database to fetch stats for
리턴 A recordset

getStatsIndexIO() 공개 메소드

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

getStatsIndexTuples() 공개 메소드

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

getStatsTableIO() 공개 메소드

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

getStatsTableTuples() 공개 메소드

Fetches tuple statistics for a table
public getStatsTableTuples ( $table ) : A
$table The table to fetch stats for
리턴 A recordset

getTable() 공개 메소드

Returns table information
public getTable ( $table ) : A
$table The name of the table
리턴 A recordset

getTableAttributes() 공개 메소드

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
리턴 All attributes in order

getTableAutovacuum() 공개 메소드

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
리턴 A recordset

getTableChildren() 공개 메소드

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

getTableDefPrefix() 공개 메소드

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
리턴 null string containing the formatted SQL code

getTableDefSuffix() 공개 메소드

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
리턴 null string containing the formatted SQL code

getTableParents() 공개 메소드

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

getTables() 공개 메소드

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
리턴 All tables, sorted alphabetically

getTablespace() 공개 메소드

Retrieves a tablespace's information
public getTablespace ( $spcname ) : A
리턴 A recordset

getTablespaces() 공개 메소드

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

getTrigger() 공개 메소드

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
리턴 A recordset

getTriggerDef() 공개 메소드

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
리턴 The trigger definition string

getTriggerFunctions() 공개 메소드

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

getTriggers() 공개 메소드

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

getType() 공개 메소드

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

getTypes() 공개 메소드

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
리턴 A recordet

getUser() 공개 메소드

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

getUsers() 공개 메소드

Returns all users in the database cluster
public getUsers ( ) : All
리턴 All users

getVariables() 공개 메소드

Returns all available variable information.
public getVariables ( ) : A
리턴 A recordset

getView() 공개 메소드

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

getViews() 공개 메소드

Returns a list of all views in the database
public getViews ( ) : All
리턴 All views

grantRole() 공개 메소드

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() 공개 메소드

Capabilities
public hasAggregateSortOp ( )

hasAlterAggregate() 공개 메소드

public hasAlterAggregate ( )

hasAlterColumnType() 공개 메소드

public hasAlterColumnType ( )

hasAlterDatabase() 공개 메소드

public hasAlterDatabase ( )

hasAlterDatabaseOwner() 공개 메소드

hasAlterDatabaseRename() 공개 메소드

hasAlterDomains() 공개 메소드

public hasAlterDomains ( )

hasAlterSchema() 공개 메소드

public hasAlterSchema ( )

hasAlterSchemaOwner() 공개 메소드

public hasAlterSchemaOwner ( )

hasAlterSequenceSchema() 공개 메소드

hasAlterSequenceStart() 공개 메소드

hasAlterTableSchema() 공개 메소드

public hasAlterTableSchema ( )

hasAutovacuum() 공개 메소드

public hasAutovacuum ( )

hasByteaHexDefault() 공개 메소드

public hasByteaHexDefault ( )

hasConcurrentIndexBuild() 공개 메소드

hasCreateFieldWithConstraints() 공개 메소드

hasCreateTableLike() 공개 메소드

public hasCreateTableLike ( )

hasCreateTableLikeWithConstraints() 공개 메소드

hasCreateTableLikeWithIndexes() 공개 메소드

hasDatabaseCollation() 공개 메소드

hasDisableTriggers() 공개 메소드

public hasDisableTriggers ( )

hasDomainConstraints() 공개 메소드

hasEnumTypes() 공개 메소드

public hasEnumTypes ( )

hasFTS() 공개 메소드

public hasFTS ( )

hasForceReindex() 공개 메소드

public hasForceReindex ( )

hasFunctionAlterOwner() 공개 메소드

hasFunctionAlterSchema() 공개 메소드

hasFunctionCosting() 공개 메소드

public hasFunctionCosting ( )

hasFunctionGUC() 공개 메소드

public hasFunctionGUC ( )

hasGrantOption() 공개 메소드

public hasGrantOption ( )

hasMagicTypes() 공개 메소드

public hasMagicTypes ( )

hasNamedParams() 공개 메소드

public hasNamedParams ( )

hasObjectID() 공개 메소드

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

hasPrepare() 공개 메소드

public hasPrepare ( )

hasPreparedXacts() 공개 메소드

public hasPreparedXacts ( )

hasQueryCancel() 공개 메소드

public hasQueryCancel ( )

hasQueryKill() 공개 메소드

public hasQueryKill ( )

hasReadOnlyQueries() 공개 메소드

public hasReadOnlyQueries ( )

hasRecluster() 공개 메소드

public hasRecluster ( )

hasRoles() 공개 메소드

public hasRoles ( )

hasServerAdminFuncs() 공개 메소드

public hasServerAdminFuncs ( )

hasSharedComments() 공개 메소드

public hasSharedComments ( )

hasTablespaces() 공개 메소드

public hasTablespaces ( )

hasUserRename() 공개 메소드

public hasUserRename ( )

hasUserSignals() 공개 메소드

public hasUserSignals ( )

hasVirtualTransactionId() 공개 메소드

insertRow() 공개 메소드

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
리턴 -1

isSuperUser() 공개 메소드

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

nextvalSequence() 공개 메소드

Execute nextval on a given sequence
public nextvalSequence ( $sequence ) : -1
$sequence Sequence name
리턴 -1

phpBool() 공개 메소드

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

printField() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

renameUser() 공개 메소드

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

resetSequence() 공개 메소드

Resets a given sequence to min value of sequence
public resetSequence ( $sequence ) : -1
$sequence Sequence name
리턴 -1

restartSequence() 공개 메소드

Restart a given sequence to its start value
public restartSequence ( $sequence ) : -1
$sequence Sequence name
리턴 -1

revokeRole() 공개 메소드

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() 공개 메소드

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

sendSignal() 공개 메소드

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

setColumnDefault() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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
리턴 -7

setPrivileges() 공개 메소드

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
리턴 -4

setRenameRole() 공개 메소드

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
리턴 -3

setRenameUser() 공개 메소드

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
리턴 -3

setRole() 공개 메소드

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() 공개 메소드

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
리턴 -1

setSchema() 공개 메소드

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

setSearchPath() 공개 메소드

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

setUser() 공개 메소드

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() 공개 메소드

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

setvalSequence() 공개 메소드

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

updateFtsConfiguration() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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() 공개 메소드

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

프로퍼티 상세

$_maxNameLen 공개적으로 프로퍼티

Max object name length
public $_maxNameLen

$_schema 공개적으로 프로퍼티

Store the current schema
public $_schema

$codemap 공개적으로 프로퍼티

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

$defaultprops 공개적으로 프로퍼티

public $defaultprops

$extraTypes 공개적으로 프로퍼티

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

$fkactions 공개적으로 프로퍼티

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

$fkdeferrable 공개적으로 프로퍼티

public $fkdeferrable

$fkinitial 공개적으로 프로퍼티

public $fkinitial

$fkmatches 공개적으로 프로퍼티

public $fkmatches

$funcprops 공개적으로 프로퍼티

Function properties
public $funcprops

$help_base 공개적으로 프로퍼티

Default help URL
public $help_base

$help_page 공개적으로 프로퍼티

Help sub pages
public $help_page

$id 공개적으로 프로퍼티

Name of id column
public $id

$joinOps 공개적으로 프로퍼티

Supported join operations for use with view wizard
public $joinOps

$langmap 공개적으로 프로퍼티

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

$major_version 공개적으로 프로퍼티

public $major_version

$predefined_size_types 공개적으로 프로퍼티

Predefined size types
public $predefined_size_types

$privlist 공개적으로 프로퍼티

of objects.
public $privlist

$privmap 공개적으로 프로퍼티

refer to.
public $privmap

$rule_events 공개적으로 프로퍼티

Rule action types
public $rule_events

$selectOps 공개적으로 프로퍼티

Select operators
public $selectOps

$triggerEvents 공개적으로 프로퍼티

Array of allowed trigger events
public $triggerEvents

$triggerExecTimes 공개적으로 프로퍼티

When to execute the trigger
public $triggerExecTimes

$triggerFrequency 공개적으로 프로퍼티

How often to execute the trigger
public $triggerFrequency

$typAlignDef 공개적으로 프로퍼티

The default type alignment
public $typAlignDef

$typAligns 공개적으로 프로퍼티

Array of allowed type alignments
public $typAligns

$typIndexDef 공개적으로 프로퍼티

Default index type
public $typIndexDef

$typIndexes 공개적으로 프로퍼티

Array of allowed index types
public $typIndexes

$typStorageDef 공개적으로 프로퍼티

The default type storage
public $typStorageDef

$typStorages 공개적으로 프로퍼티

Array of allowed type storage attributes
public $typStorages