Methods summary
	
		| 
			 public 
			string
			
			 | 
		#
		quoteSimpleTableName( string $name )
			
Quotes a table name for use in a query. A simple table name does not schema
prefix. 
			
Quotes a table name for use in a query. A simple table name does not schema
prefix. Parameters
					$namestring$name table name
Returns
					stringthe properly quoted table name
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 public 
			
			
			 | 
		#
		resetSequence( CDbTableSchema$table, integer|null $value = null )
			
Resets the sequence value of a table's primary key. The sequence will be
reset such that the primary key of the next new row inserted will have the
specified value or max value of a primary key plus one (i.e. sequence
trimming). 
			
Resets the sequence value of a table's primary key. The sequence will be
reset such that the primary key of the next new row inserted will have the
specified value or max value of a primary key plus one (i.e. sequence
trimming). Parameters
					$tableCDbTableSchema$table the table schema whose primary key sequence will be reset
$valueinteger|null$value the value for the primary key of the next new row inserted. If this is
not set, the next new row's primary key will have the max value of a primary key
plus one (i.e. sequence trimming).
Since
						1.1
 Overrides | 
	
		| 
			 public 
			
			
			 | 
		#
		checkIntegrity( boolean $check = true, string $schema = '' )
			
Enables or disables integrity check. 
			
Enables or disables integrity check. Parameters
					$checkboolean$check whether to turn on or off the integrity check.
$schemastring$schema the schema of the tables. Defaults to empty string, meaning the current
or default schema.
Since
						1.1
 Overrides | 
	
		| 
			 protected 
			CDbTableSchema | 
		#
		loadTable( string $name )
			
Loads the metadata for the specified table. 
			
Loads the metadata for the specified table. Parameters
					$namestring$name table name
Returns | 
	
		| 
			 protected 
			
			
			 |  | 
	
		| 
			 protected 
			boolean
			
			 | 
		#
		findColumns( CPgsqlTableSchema$table )
			
Collects the table column metadata. 
			
Collects the table column metadata. ParametersReturns
					booleanwhether the table exists in the database
 
 | 
	
		| 
			 protected 
			CDbColumnSchema | 
		#
		createColumn( array $column )
			
Creates a table column. Parameters
					$columnarray$column column metadata
Returns | 
	
		| 
			 protected 
			
			
			 | 
		#
		findConstraints( CPgsqlTableSchema$table )
			
Collects the primary and foreign key column details for the given table. 
			
Collects the primary and foreign key column details for the given table. Parameters | 
	
		| 
			 protected 
			
			
			 |  | 
	
		| 
			 protected 
			
			
			 |  | 
	
		| 
			 protected 
			array
			
			 | 
		#
		findTableNames( string $schema = '' )
			
Returns all table names in the database. 
			
Returns all table names in the database. Parameters
					$schemastring$schema the schema of the tables. Defaults to empty string, meaning the current
or default schema. If not empty, the returned table names will be prefixed with
the schema name.
Returns
					arrayall table names in the database.
 
 Throws
					CDbExceptionif current schema does not support fetching all table names
				 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		renameTable( string $table, string $newName )
			
Builds a SQL statement for renaming a DB table. 
			
Builds a SQL statement for renaming a DB table. Parameters
					$tablestring$table the table to be renamed. The name will be properly quoted by the method.
$newNamestring$newName the new table name. The name will be properly quoted by the method.
Returns
					stringthe SQL statement for renaming a DB table.
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		addColumn( string $table, string $column, string $type )
			
Builds a SQL statement for adding a new DB column. 
			
Builds a SQL statement for adding a new DB column. Parameters
					$tablestring$table the table that the new column will be added to. The table name will be
properly quoted by the method.
$columnstring$column the name of the new column. The name will be properly quoted by the
method.
$typestring$type the column type. The
 CDbSchema::getColumnType()method will be invoked to
convert abstract column type (if any) into the physical one. Anything that is
not recognized as abstract type will be kept in the generated SQL. For example,
'string' will be turned into 'varchar(255)', while 'string not null' will become
'varchar(255) not null'.Returns
					stringthe SQL statement for adding a new column.
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		alterColumn( string $table, string $column, string $type )
			
Builds a SQL statement for changing the definition of a column. 
			
Builds a SQL statement for changing the definition of a column. Parameters
					$tablestring$table the table whose column is to be changed. The table name will be properly
quoted by the method.
$columnstring$column the name of the column to be changed. The name will be properly quoted
by the method.
$typestring$type the new column type. The
 CDbSchema::getColumnType()method will be invoked to
convert abstract column type (if any) into the physical one. Anything that is
not recognized as abstract type will be kept in the generated SQL. For example,
'string' will be turned into 'varchar(255)', while 'string not null' will become
'varchar(255) not null'.Returns
					stringthe SQL statement for changing the definition of a column.
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		createIndex( string $name, string $table, string $columns, boolean $unique = false )
			
Builds a SQL statement for creating a new index. 
			
Builds a SQL statement for creating a new index. Parameters
					$namestring$name the name of the index. The name will be properly quoted by the method.
$tablestring$table the table that the new index will be created for. The table name will be
properly quoted by the method.
$columnsstring$columns the column(s) that should be included in the index. If there are
multiple columns, please separate them by commas. Each column name will be
properly quoted by the method, unless a parenthesis is found in the name.
$uniqueboolean$unique whether to add UNIQUE constraint on the created index.
Returns
					stringthe SQL statement for creating a new index.
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 public 
			string
			
			 | 
		#
		dropIndex( string $name, string $table )
			
Builds a SQL statement for dropping an index. 
			
Builds a SQL statement for dropping an index. Parameters
					$namestring$name the name of the index to be dropped. The name will be properly quoted by
the method.
$tablestring$table the table whose index is to be dropped. The name will be properly quoted
by the method.
Returns
					stringthe SQL statement for dropping an index.
 
 Since
						1.1.6
 Overrides | 
	
		| 
			 protected 
			CPgsqlCommandBuilder | 
		#
		createCommandBuilder( )
			
Creates a command builder for the database. This method may be overridden by
child classes to create a DBMS-specific command builder. 
			
Creates a command builder for the database. This method may be overridden by
child classes to create a DBMS-specific command builder. ReturnsOverrides | 
	
	
	Properties summary
	
		| 
			public  
			array
		 | $columnTypes | array(
	'pk' => 'serial NOT NULL PRIMARY KEY',
	'bigpk' => 'bigserial NOT NULL PRIMARY KEY',
	'string' => 'character varying (255)',
	'text' => 'text',
	'integer' => 'integer',
	'bigint' => 'bigint',
	'float' => 'double precision',
	'decimal' => 'numeric',
	'datetime' => 'timestamp',
	'timestamp' => 'timestamp',
	'time' => 'time',
	'date' => 'date',
	'binary' => 'bytea',
	'boolean' => 'boolean',
	'money' => 'decimal(19,4)',
) | 
			#
			
				
the abstract column types mapped to physical column types. 
				
the abstract column types mapped to physical column types. Since
							1.1.6
 |