Methods summary
	
		| 
			 public 
			Horde_Db_Adapter_Postgresql_Column | 
		#
		makeColumn( string $name, string $default, string $sqlType = null, boolean $null = true )
			Factory for Column objects. 
			Factory for Column objects. Parameters
					$name<p>The column's name, such as "supplier_id" in
                        "supplier_id int(11)".</p>
$default<p>The type-casted default value, such as "new" in
                        "sales_stage varchar(20) default 'new'".</p>
$sqlType<p>Used to extract the column's type, length and
                        signed status, if necessary. For example
                        "varchar" and "60" in "company_name varchar(60)"
                        or "unsigned => true" in "int(10) UNSIGNED".</p>
$nullWhether this column allows NULL values.
ReturnsOverrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		quote( mixed $value, object $column = null )
			Quotes the column value to help prevent SQL injection attacks. 
			Quotes the column value to help prevent SQL injection attacks. This method makes educated guesses on the scalar type based on the
passed value. Make sure to correctly cast the value and/or pass the
$column parameter to get the best results. Parameters
					$value<p>The scalar value to quote, a Horde_Db_Value,
                       Horde_Date, or DateTime instance, or an object
                       implementing quotedId().</p>
$columnAn object implementing getType().
Returns
					stringThe correctly quoted value.
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		quoteColumnName( string $name )
			Returns a quoted form of the column name. 
			Returns a quoted form of the column name. ParametersReturns
					stringThe quoted column name.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		quoteSequenceName( string $name )
			Returns a quoted sequence name. 
			Returns a quoted sequence name. PostgreSQL specific method. ParametersReturns
					stringThe quoted sequence name.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		quoteBinary( mixed $value )
			Returns a quoted binary value. 
			Returns a quoted binary value. ParametersReturns
					stringThe quoted binary value.
 Overrides | 
	
		| 
			 public 
			array
			
			 | 
		#
		nativeDatabaseTypes( )
			Returns a hash of mappings from the abstract data types to the native
database types. 
			Returns a hash of mappings from the abstract data types to the native
database types. See TableDefinition::column() for details on the recognized abstract
data types. Returns
					arrayA database type map.
 See
						TableDefinition::column()
 Overrides | 
	
		| 
			 public 
			integer
			
			 | 
		#
		tableAliasLength( )
			Returns the maximum length a table alias can have. 
			Returns the maximum length a table alias can have. Returns the configured supported identifier length supported by
PostgreSQL, or report the default of 63 on PostgreSQL 7.x. Returns
					integerThe maximum table alias length.
 Overrides | 
	
		| 
			 public 
			array
			
			 | 
		#
		tables( )
			Returns a list of all tables in the schema search path. 
			Returns a list of all tables in the schema search path. Returns
					arrayA table list.
 | 
	
		| 
			 public 
			Horde_Db_Adapter_Base_Index | 
		#
		primaryKey( string $tableName, string $name = null )
			Returns a table's primary key. 
			Returns a table's primary key. Parameters
					$tableNameA table name.
$name(can be removed?)
Returns | 
	
		| 
			 public 
			array
			
			 | 
		#
		indexes( string $tableName, string $name = null )
			Returns a list of tables indexes. 
			Returns a list of tables indexes. Parameters
					$tableNameA table name.
$name(can be removed?)
Returns
					arrayA list of Horde_Db_Adapter_Base_Index objects.
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		columns( string $tableName, string $name = null )
			Returns a list of table columns. 
			Returns a list of table columns. Parameters
					$tableNameA table name.
$name(can be removed?)
Returns
					arrayA list of Horde_Db_Adapter_Base_Column objects.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		renameTable( string $name, string $newName )
			Renames a table. Parameters
					$nameA table name.
$newNameThe new table name.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		addColumn( string $tableName, string $columnName, string $type, array $options = array() )
			Adds a new column to a table. 
			Adds a new column to a table. Parameters
					$tableNameA table name.
$columnNameA column name.
$typeA data type.
$options<p>Column options. See
                           Horde_Db_Adapter_Base_TableDefinition#column()
                           for details.</p>
Overrides | 
	
		| 
			 public 
			
			
			 | 
		#
		changeColumn( string $tableName, string $columnName, string $type, array $options = array() )
			Changes an existing column's definition. 
			Changes an existing column's definition. Parameters
					$tableNameA table name.
$columnNameA column name.
$typeA data type.
$options<p>Column options. See
                           Horde_Db_Adapter_Base_TableDefinition#column()
                           for details.</p>
 | 
	
		| 
			 public 
			
			
			 | 
		#
		changeColumnDefault( string $tableName, string $columnName, mixed $default )
			Sets a new default value for a column. 
			Sets a new default value for a column. If you want to set the default value to NULL, you are out of luck. You
need to execute the apppropriate SQL statement yourself. Parameters
					$tableNameA table name.
$columnNameA column name.
$defaultThe new default value.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		changeColumnNull( string $tableName, string $columnName, boolean $null, mixed $default = null )
			Sets whether a column allows NULL values. 
			Sets whether a column allows NULL values. Parameters
					$tableNameA table name.
$columnNameA column name.
$nullWhether NULL values are allowed.
$defaultThe new default value.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		renameColumn( string $tableName, string $columnName, string $newColumnName )
			Renames a column. Parameters
					$tableNameA table name.
$columnNameA column name.
$newColumnNameThe new column name.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		removePrimaryKey( string $tableName )
			Removes a primary key from a table. 
			Removes a primary key from a table. ParametersThrowsSince
						Horde_Db 1.1.0
 | 
	
		| 
			 public 
			
			
			 | 
		#
		removeIndex( string $tableName, string|array $options = array() )
			Removes an index from a table. 
			Removes an index from a table. See parent class for examples. Parameters
					$tableNameA table name.
$options<p>Either a column name or index options:
                              - name: (string) the index name.
                              - column: (string|array) column name(s).</p>
Overrides | 
	
		| 
			 public 
			
			
			 | 
		#
		createDatabase( string $name, array $options = array() )
			Creates a database. Parameters
					$nameA database name.
$options<p>Database options: owner, template, charset,
                       tablespace, and connection_limit.</p>
 | 
	
		| 
			 public 
			
			
			 |  | 
	
		| 
			 public 
			string
			
			 | 
		#
		currentDatabase( )
			Returns the name of the currently selected database. 
			Returns the name of the currently selected database. Returns
					stringThe database name.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		typeToSql( string $type, integer $limit = null, integer $precision = null, integer $scale = null, boolean $unsigned = null )
			Generates the SQL definition for a column type. 
			Generates the SQL definition for a column type. Parameters
					$typeA column type.
$limitMaximum column length (non decimal type only)
$precisionThe number precision (decimal type only).
$scaleThe number scaling (decimal columns only).
$unsigned<p>Whether the column is an unsigned number
                           (non decimal columns only).</p>
Returns
					stringThe SQL definition. If $type is not one of the
                internally supported types, $type is returned unchanged. Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		distinct( string $columns, string $orderBy = null )
			Generates a DISTINCT clause for SELECT queries. 
			Generates a DISTINCT clause for SELECT queries. PostgreSQL requires the ORDER BY columns in the SELECT list for distinct
queries, and requires that the ORDER BY include the DISTINCT column. $connection->distinct('posts.id', 'posts.created_at DESC')Parameters
					$columnsA column list.
$orderByAn ORDER clause.
Returns
					stringThe generated DISTINCT clause.
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		addOrderByForAssociationLimiting( string $sql, array $options )
			Adds an ORDER BY clause to an existing query. 
			Adds an ORDER BY clause to an existing query. PostgreSQL does not allow arbitrary ordering when using DISTINCT ON, so
we work around this by wrapping the $sql string as a sub-select and
ordering in that query. Parameters
					$sqlAn SQL query to manipulate.
$options<p>Options:
                       - order: Order column an direction.</p>
Returns
					stringThe manipulated SQL query.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		interval( string $interval, string $precision )
			Generates an INTERVAL clause for SELECT queries. 
			Generates an INTERVAL clause for SELECT queries. Parameters
					$intervalThe interval.
$precisionThe precision.
Returns
					stringThe generated INTERVAL clause.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		modifyDate( string $reference, string $operator, integer $amount, string $interval )
			Generates a modified date for SELECT queries. 
			Generates a modified date for SELECT queries. Parameters
					$reference<p>The reference date - this is a column
                          referenced in the SELECT.</p>
$operatorAdd or subtract time? (+/-)
$amount<p>The shift amount (number of days if $interval
                          is DAY, etc).</p>
$interval<p>The interval (SECOND, MINUTE, HOUR, DAY,
                          MONTH, YEAR).</p>
Returns
					stringThe generated INTERVAL clause.
 Since
						Horde_Db 1.2.0
 Overrides | 
	
		| 
			 public 
			string|array
			
			 | 
		#
		buildClause( string $lhs, string $op, string $rhs, boolean $bind = false, array $params = array() )
			Returns an expression using the specified operator. 
			Returns an expression using the specified operator. Parameters
					$lhsThe column or expression to test.
$opThe operator.
$rhsThe comparison value.
$bind<p>If true, the method returns the query and a list
                      of values suitable for binding as an array.</p>
$paramsAny additional parameters for the operator.
Returns
					string|arrayThe SQL test fragment, or an array containing the
                      query and a list of values if $bind is true. Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		encoding( )
			Returns the current database's encoding format. 
			Returns the current database's encoding format. Returns
					stringThe current database's encoding format.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setSchemaSearchPath( string $schemaCsv )
			Sets the schema search path to a string of comma-separated schema names. 
			Sets the schema search path to a string of comma-separated schema names. Names beginning with $ have to be quoted (e.g. $user => '$user').  See:
http://www.postgresql.org/docs/current/static/ddl-schemas.html Parameters
					$schemaCsvA comma-separated schema name list.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getSchemaSearchPath( )
			Returns the active schema search path. 
			Returns the active schema search path. Returns
					stringThe active schema search path.
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		getClientMinMessages( )
			Returns the current client log message level. 
			Returns the current client log message level. Returns
					stringThe current client log message level.
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setClientMinMessages( string $level )
			Sets the client log message level. 
			Sets the client log message level. Parameters
					$level<p>The client log message level. One of DEBUG5,
                      DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, NOTICE,
                      WARNING, ERROR, FATAL, or PANIC.</p>
 | 
	
		| 
			 public 
			string
			
			 | 
		#
		defaultSequenceName( string $tableName, string $pk = null )
			Returns the sequence name for a table's primary key or some other
specified key. 
			Returns the sequence name for a table's primary key or some other
specified key. If a sequence name doesn't exist, it is built from the table and primary
key name. Parameters
					$tableNameA table name.
$pk<p>A primary key name. Overrides the existing key
                          name when building a new sequence name.</p>
Returns
					stringThe key's sequence name.
 | 
	
		| 
			 public 
			integer
			
			 | 
		#
		resetPkSequence( string $table, string $pk = null, string $sequence = null )
			Resets the sequence of a table's primary key to the maximum value. 
			Resets the sequence of a table's primary key to the maximum value. Parameters
					$table$tableName  A table name.
$pk<p>A primary key name. Defaults to the existing
                          primary key.</p>
$sequence<p>A sequence name. Defaults to the sequence name
                          of the existing primary key.</p>
Returns
					integerThe (next) sequence value if a primary key and a
                 sequence exist. | 
	
		| 
			 public 
			array
			
			 | 
		#
		pkAndSequenceFor( string $table )
			Returns a table's primary key and the key's sequence. 
			Returns a table's primary key and the key's sequence. Parameters
					$table$tableName  A table name.
Returns
					arrayArray with two values: the primary key name and the key's
               sequence name. | 
	
		| 
			 public 
			integer
			
			 | 
		#
		postgresqlVersion( )
			Returns the version of the connected PostgreSQL server. 
			Returns the version of the connected PostgreSQL server. Returns
					integerZero padded PostgreSQL version, e.g. 80108 for 8.1.8.
 |