W3C
school
文档首页
HTML
CSS
Javascript
Python
jQuery
NodeJS
PHP
Java
MySQL
Express
More »
开关
PostgreSQL 9.4 官方文档
Tutorial: Getting Started
1. Installation
2. Architectural Fundamentals
3. Creating a Database
4. Accessing a Database
Tutorial: Advanced Features
1. Introduction
2. Views
3. Foreign Keys
4. Transactions
5. Window Functions
6. Inheritance
7. Conclusion
Tutorial: The SQL Language
1. Introduction
2. Concepts
3. Creating a New Table
4. Populating a Table With Rows
5. Querying a Table
6. Joins Between Tables
7. Aggregate Functions
8. Updates
9. Deletions
Commands
ABORT
ALTER AGGREGATE
ALTER COLLATION
ALTER CONVERSION
ALTER DATABASE
ALTER DEFAULT PRIVILEGES
ALTER DOMAIN
ALTER EVENT TRIGGER
ALTER EXTENSION
ALTER FOREIGN DATA WRAPPER
ALTER FOREIGN TABLE
ALTER FUNCTION
ALTER GROUP
ALTER INDEX
ALTER LANGUAGE
ALTER LARGE OBJECT
ALTER MATERIALIZED VIEW
ALTER OPERATOR
ALTER OPERATOR CLASS
ALTER OPERATOR FAMILY
ALTER ROLE
ALTER RULE
ALTER SCHEMA
ALTER SEQUENCE
ALTER SERVER
ALTER SYSTEM
ALTER TABLE
ALTER TABLESPACE
ALTER TEXT SEARCH CONFIGURATION
ALTER TEXT SEARCH DICTIONARY
ALTER TEXT SEARCH PARSER
ALTER TEXT SEARCH TEMPLATE
ALTER TRIGGER
ALTER TYPE
ALTER USER
ALTER USER MAPPING
ALTER VIEW
ANALYZE
BEGIN
CHECKPOINT
CLOSE
CLUSTER
COMMENT
COMMIT
COMMIT PREPARED
COPY
CREATE AGGREGATE
CREATE CAST
CREATE COLLATION
CREATE CONVERSION
CREATE DATABASE
CREATE DOMAIN
CREATE EVENT TRIGGER
CREATE EXTENSION
CREATE FOREIGN DATA WRAPPER
CREATE FOREIGN TABLE
CREATE FUNCTION
CREATE GROUP
CREATE INDEX
CREATE LANGUAGE
CREATE MATERIALIZED VIEW
CREATE OPERATOR
CREATE OPERATOR CLASS
CREATE OPERATOR FAMILY
CREATE ROLE
CREATE RULE
CREATE SCHEMA
CREATE SEQUENCE
CREATE SERVER
CREATE TABLE
CREATE TABLE AS
CREATE TABLESPACE
CREATE TEXT SEARCH CONFIGURATION
CREATE TEXT SEARCH DICTIONARY
CREATE TEXT SEARCH PARSER
CREATE TEXT SEARCH TEMPLATE
CREATE TRIGGER
CREATE TYPE
CREATE USER
CREATE USER MAPPING
CREATE VIEW
DEALLOCATE
DECLARE
DELETE
DISCARD
DO
DROP AGGREGATE
DROP CAST
DROP COLLATION
DROP CONVERSION
DROP DATABASE
DROP DOMAIN
DROP EVENT TRIGGER
DROP EXTENSION
DROP FOREIGN DATA WRAPPER
DROP FOREIGN TABLE
DROP FUNCTION
DROP GROUP
DROP INDEX
DROP LANGUAGE
DROP MATERIALIZED VIEW
DROP OPERATOR
DROP OPERATOR CLASS
DROP OPERATOR FAMILY
DROP OWNED
DROP ROLE
DROP RULE
DROP SCHEMA
DROP SEQUENCE
DROP SERVER
DROP TABLE
DROP TABLESPACE
DROP TEXT SEARCH CONFIGURATION
DROP TEXT SEARCH DICTIONARY
DROP TEXT SEARCH PARSER
DROP TEXT SEARCH TEMPLATE
DROP TRIGGER
DROP TYPE
DROP USER
DROP USER MAPPING
DROP VIEW
END
EXECUTE
EXPLAIN
FETCH
GRANT
INSERT
LISTEN
LOAD
LOCK
MOVE
NOTIFY
PREPARE
PREPARE TRANSACTION
REASSIGN OWNED
REFRESH MATERIALIZED VIEW
REINDEX
RELEASE SAVEPOINT
RESET
REVOKE
ROLLBACK
ROLLBACK PREPARED
ROLLBACK TO SAVEPOINT
SAVEPOINT
SECURITY LABEL
SELECT
SELECT ... DISTINCT
SELECT ... EXCEPT
SELECT ... FROM
SELECT ... GROUP BY
SELECT ... HAVING
SELECT ... INTERSECT
SELECT ... LIMIT
SELECT ... ORDER BY
SELECT ... UNION
SELECT ... WHERE
SELECT ... WINDOW
SELECT ... WITH
SELECT INTO
SET
SET CONSTRAINTS
SET ROLE
SET SESSION AUTHORIZATION
SET TRANSACTION
SHOW
START TRANSACTION
TRUNCATE
UNLISTEN
UPDATE
VACUUM
VALUES
Appendixes
Acronyms
PostgreSQL Error Codes
SQL Key Words
Functions: System Administration
Administration Functions
System Administration: current_setting
System Administration: pg_advisory_lock
System Administration: pg_advisory_lock_shared
System Administration: pg_advisory_unlock
System Administration: pg_advisory_unlock_all
System Administration: pg_advisory_unlock_shared
System Administration: pg_advisory_xact_lock
System Administration: pg_advisory_xact_lock_shared
System Administration: pg_backup_start_time
System Administration: pg_cancel_backend
System Administration: pg_column_size
System Administration: pg_create_logical_replication_slot
System Administration: pg_create_physical_replication_slot
System Administration: pg_create_restore_point
System Administration: pg_current_xlog_insert_location
System Administration: pg_current_xlog_location
System Administration: pg_database_size
System Administration: pg_drop_replication_slot
System Administration: pg_export_snapshot
System Administration: pg_filenode_relation
System Administration: pg_indexes_size
System Administration: pg_is_in_backup
System Administration: pg_is_in_recovery
System Administration: pg_is_xlog_replay_paused
System Administration: pg_last_xact_replay_timestamp
System Administration: pg_last_xlog_receive_location
System Administration: pg_last_xlog_replay_location
System Administration: pg_logical_slot_get_binary_changes
System Administration: pg_logical_slot_get_changes
System Administration: pg_logical_slot_peek_binary_changes
System Administration: pg_logical_slot_peek_changes
System Administration: pg_ls_dir
System Administration: pg_read_binary_file
System Administration: pg_read_file
System Administration: pg_relation_filenode
System Administration: pg_relation_filepath
System Administration: pg_relation_size
System Administration: pg_reload_conf
System Administration: pg_rotate_logfile
System Administration: pg_size_pretty
System Administration: pg_start_backup
System Administration: pg_stat_file
System Administration: pg_stop_backup
System Administration: pg_switch_xlog
System Administration: pg_tablespace_size
System Administration: pg_table_size
System Administration: pg_terminate_backend
System Administration: pg_total_relation_size
System Administration: pg_try_advisory_lock
System Administration: pg_try_advisory_lock_shared
System Administration: pg_try_advisory_xact_lock
System Administration: pg_try_advisory_xact_lock_shared
System Administration: pg_xlogfile_name
System Administration: pg_xlogfile_name_offset
System Administration: pg_xlog_location_diff
System Administration: pg_xlog_replay_pause
System Administration: pg_xlog_replay_resume
System Administration: set_config
Appendix: Additional Supplied Modules
adminpack
auth_delay
auto_explain
btree_gin
btree_gist
chkpass
citext
cube
dict_int
dict_xsyn
dummy_seclabel
earthdistance
file_fdw
fuzzystrmatch
hstore
intagg
intarray
isn
lo
ltree
pageinspect
passwordcheck
pgcrypto
pgrowlocks
pgstattuple
pg_buffercache
pg_freespacemap
pg_prewarm
pg_stat_statements
pg_trgm
postgres_fdw
seg
sepgsql
spi
sslinfo
tablefunc
tcn
test_decoding
test_parser
test_shm_mq
tsearch2
unaccent
uuid-ossp
xml2
Functions: Aggregate
Aggregate Functions
Aggregate: array_agg
Aggregate: avg
Aggregate: bit_and
Aggregate: bit_or
Aggregate: bool_and
Aggregate: bool_or
Aggregate: corr
Aggregate: count
Aggregate: covar_pop
Aggregate: covar_samp
Aggregate: cume_dist WITHIN GROUP
Aggregate: dense_rank WITHIN GROUP
Aggregate: every
Aggregate: json_agg
Aggregate: json_object_agg
Aggregate: max
Aggregate: min
Aggregate: mode WITHIN GROUP
Aggregate: percentile_cont WITHIN GROUP
Aggregate: percentile_disc WITHIN GROUP
Aggregate: percent_rank WITHIN GROUP
Aggregate: rank WITHIN GROUP
Aggregate: regr_avgx
Aggregate: regr_avgy
Aggregate: regr_count
Aggregate: regr_intercept
Aggregate: regr_r2
Aggregate: regr_slope
Aggregate: regr_sxx
Aggregate: regr_sxy
Aggregate: regr_syy
Aggregate: stddev
Aggregate: stddev_pop
Aggregate: stddev_samp
Aggregate: string_agg
Aggregate: sum
Aggregate: variance
Aggregate: var_pop
Aggregate: var_samp
Aggregate: xmlagg
High Availability
Alternative Method for Log Shipping
Comparison of Different Solutions
Failover
Hot Standby
Log-Shipping Standby Servers
Recovery Configuration
Archive Recovery Settings
Config: archive_cleanup_command
Config: pause_at_recovery_target
Config: primary_conninfo
Config: primary_slot_name
Config: recovery_end_command
Config: recovery_min_apply_delay
Config: recovery_target
Config: recovery_target_inclusive
Config: recovery_target_name
Config: recovery_target_time
Config: recovery_target_timeline
Config: recovery_target_xid
Config: restore_command
Config: standby_mode
Config: trigger_file
Recovery Target Settings
Standby Server Settings
Functions and Operators
Array Comparisons
Array Comparisons: ALL (array)
Array Comparisons: ANY/SOME (array)
Array Comparisons: IN
Array Comparisons: NOT IN
Comparison Operators
Comparison Operators: <
Comparison Operators: <=
Comparison Operators: <>
Comparison Operators: =
Comparison Operators: >
Comparison Operators: >=
Conditional Expressions
Conditional Expressions: CASE
Conditional Expressions: COALESCE
Conditional Expressions: GREATEST and LEAST
Conditional Expressions: NULLIF
Enum Functions
Enum Functions: enum_first
Enum Functions: enum_last
Enum Functions: enum_range
Logical Operators
Logical Operators: AND
Logical Operators: NOT
Logical Operators: OR
Pattern Matching
Pattern Matching: LIKE
Pattern Matching: POSIX Regular Expressions
Pattern Matching: SIMILAR TO Regular Expressions
Sequence Functions
Sequence Functions: currval
Sequence Functions: lastval
Sequence Functions: nextval
Sequence Functions: setval
Set Returning Functions
Set Returning Functions: generate_series
Set Returning Functions: generate_subscripts
Subquery Expressions
Subquery Expressions: ALL
Subquery Expressions: ANY/SOME
Subquery Expressions: EXISTS
Subquery Expressions: IN
Subquery Expressions: NOT IN
Functions: Array
Array Functions and Operators
Array: &&
Array: <
Array: <=
Array: <>
Array: <@
Array: =
Array: >
Array: >=
Array: @>
Array: array_append
Array: array_cat
Array: array_dims
Array: array_fill
Array: array_length
Array: array_lower
Array: array_ndims
Array: array_prepend
Array: array_remove
Array: array_replace
Array: array_to_string
Array: array_upper
Array: cardinality
Array: string_to_array
Array: unnest
Array: ||
Data Types
Arrays
Binary Data Types
Binary Data Types: bytea
Bit String Types
Boolean Type
Boolean Type: boolean
Character Types
Character Types: "char"
Character Types: char
Character Types: character
Character Types: character varying
Character Types: name
Character Types: text
Character Types: varchar
Composite Types
Date/Time Types
Date/Time Types: date
Date/Time Types: interval
Date/Time Types: time
Date/Time Types: time with time zone
Date/Time Types: timestamp
Date/Time Types: timestamp with time zone
Enumerated Types
Geometric Types
Geometric Types: box
Geometric Types: circle
Geometric Types: line
Geometric Types: lseg
Geometric Types: path
Geometric Types: point
Geometric Types: polygon
JSON Types
JSON Types: boolean
JSON Types: null
JSON Types: number
JSON Types: string
Monetary Types
Network Address Types
Network Address Types: cidr
Network Address Types: inet
Network Address Types: macaddr
Numeric Types
Numeric Types: bigint
Numeric Types: bigserial
Numeric Types: decimal
Numeric Types: double precision
Numeric Types: integer
Numeric Types: numeric
Numeric Types: real
Numeric Types: serial
Numeric Types: smallint
Numeric Types: smallserial
Object Identifier Types
Object Identifier Types: oid
Object Identifier Types: regclass
Object Identifier Types: regconfig
Object Identifier Types: regdictionary
Object Identifier Types: regoper
Object Identifier Types: regoperator
Object Identifier Types: regproc
Object Identifier Types: regprocedure
Object Identifier Types: regtype
pg_lsn Type
Pseudo-Types
Pseudo-Types: any
Pseudo-Types: anyarray
Pseudo-Types: anyelement
Pseudo-Types: anyenum
Pseudo-Types: anynonarray
Pseudo-Types: anyrange
Pseudo-Types: cstring
Pseudo-Types: event_trigger
Pseudo-Types: fdw_handler
Pseudo-Types: internal
Pseudo-Types: language_handler
Pseudo-Types: opaque
Pseudo-Types: record
Pseudo-Types: trigger
Pseudo-Types: void
Range Types
Range Types: daterange
Range Types: int4range
Range Types: int8range
Range Types: numrange
Range Types: tsrange
Range Types: tstzrange
Text Search Types
Text Search Types: tsquery
Text Search Types: tsvector
UUID Type
XML Type
Write-Ahead Log
Asynchronous Commit
Reliability
WAL Configuration
WAL Internals
Write-Ahead Logging (WAL)
Client Authentication
Authentication Methods
Authentication Problems
pg_hba.conf File
User Name Maps
Functions: Binary String
Binary String Functions and Operators
Binary String: btrim
Binary String: decode
Binary String: encode
Binary String: get_bit
Binary String: get_byte
Binary String: length
Binary String: md5
Binary String: octet_length
Binary String: overlay
Binary String: position
Binary String: set_bit
Binary String: set_byte
Binary String: substring
Binary String: trim
Binary String: ||
Functions: Bit String
Bit String Functions and Operators
Bit String: #
Bit String: &
Bit String: <<
Bit String: >>
Bit String: |
Bit String: ||
Bit String: ~
Syntax
Calling Functions
Calling Functions: Mixed Notation
Calling Functions: Named Notation
Calling Functions: Positional Notation
Lexical Structure
Lexical Structure: Comments
Lexical Structure: Constants
Lexical Structure: Identifiers and Key Words
Lexical Structure: Operator Precedence
Lexical Structure: Operators
Lexical Structure: Special Characters
Value Expressions
Value Expressions: Aggregate Expressions
Value Expressions: Array Constructors
Value Expressions: Collation Expressions
Value Expressions: Column References
Value Expressions: Expression Evaluation Rules
Value Expressions: Field Selection
Value Expressions: Function Calls
Value Expressions: Operator Invocations
Value Expressions: Positional Parameters
Value Expressions: Row Constructors
Value Expressions: Scalar Subqueries
Value Expressions: Subscripts
Value Expressions: Type Casts
Value Expressions: Window Function Calls
Internals: Catalogs
Catalogs: pg_aggregate
Catalogs: pg_am
Catalogs: pg_amop
Catalogs: pg_amproc
Catalogs: pg_attrdef
Catalogs: pg_attribute
Catalogs: pg_authid
Catalogs: pg_auth_members
Catalogs: pg_available_extensions
Catalogs: pg_available_extension_versions
Catalogs: pg_cast
Catalogs: pg_class
Catalogs: pg_collation
Catalogs: pg_constraint
Catalogs: pg_conversion
Catalogs: pg_cursors
Catalogs: pg_database
Catalogs: pg_db_role_setting
Catalogs: pg_default_acl
Catalogs: pg_depend
Catalogs: pg_description
Catalogs: pg_enum
Catalogs: pg_event_trigger
Catalogs: pg_extension
Catalogs: pg_foreign_data_wrapper
Catalogs: pg_foreign_server
Catalogs: pg_foreign_table
Catalogs: pg_group
Catalogs: pg_index
Catalogs: pg_indexes
Catalogs: pg_inherits
Catalogs: pg_language
Catalogs: pg_largeobject
Catalogs: pg_largeobject_metadata
Catalogs: pg_locks
Catalogs: pg_matviews
Catalogs: pg_namespace
Catalogs: pg_opclass
Catalogs: pg_operator
Catalogs: pg_opfamily
Catalogs: pg_pltemplate
Catalogs: pg_prepared_statements
Catalogs: pg_prepared_xacts
Catalogs: pg_proc
Catalogs: pg_range
Catalogs: pg_replication_slots
Catalogs: pg_rewrite
Catalogs: pg_roles
Catalogs: pg_rules
Catalogs: pg_seclabel
Catalogs: pg_seclabels
Catalogs: pg_settings
Catalogs: pg_shadow
Catalogs: pg_shdepend
Catalogs: pg_shdescription
Catalogs: pg_shseclabel
Catalogs: pg_statistic
Catalogs: pg_stats
Catalogs: pg_tables
Catalogs: pg_tablespace
Catalogs: pg_timezone_abbrevs
Catalogs: pg_timezone_names
Catalogs: pg_trigger
Catalogs: pg_ts_config
Catalogs: pg_ts_config_map
Catalogs: pg_ts_dict
Catalogs: pg_ts_parser
Catalogs: pg_ts_template
Catalogs: pg_type
Catalogs: pg_user
Catalogs: pg_user_mapping
Catalogs: pg_user_mappings
Catalogs: pg_views
Catalogs: System Views
System Catalogs
Concurrency Control
Caveats
Concurrency Control
Data Consistency Checks at the Application Level
Explicit Locking
Explicit Locking: Advisory Locks
Explicit Locking: Deadlocks
Explicit Locking: Page-level Locks
Explicit Locking: Row-level Locks
Explicit Locking: Table-level Locks
Locking and Indexes
Transaction Isolation
Transaction Isolation: Read Committed Isolation Level
Transaction Isolation: Repeatable Read Isolation Level
Transaction Isolation: Serializable Isolation Level
Localization
Character Set Support
Collation Support
Locale Support
Applications
clusterdb
createdb
createlang
createuser
dropdb
droplang
dropuser
ecpg
initdb
pg_basebackup
pg_config
pg_controldata
pg_ctl
pg_dump
pg_dumpall
pg_isready
pg_receivexlog
pg_recvlogical
pg_resetxlog
pg_restore
postgres
postmaster
psql
reindexdb
vacuumdb
Indexes
Combining Multiple Indexes
Examining Index Usage
Index Types
Indexes
Indexes and Collations
Indexes and ORDER BY
Indexes on Expressions
Multicolumn Indexes
Operator Classes and Operator Families
Partial Indexes
Unique Indexes
Queries
Combining Queries
Combining Queries: EXCEPT
Combining Queries: INTERSECT
Combining Queries: UNION
LIMIT and OFFSET
ORDER BY
Queries
SELECT Lists
SELECT Lists: Column Labels
SELECT Lists: DISTINCT
SELECT Lists: Select-List Items
Table Expressions
Table Expressions: FROM Clause
Table Expressions: FULL OUTER JOIN
Table Expressions: GROUP BY and HAVING Clauses
Table Expressions: INNER JOIN
Table Expressions: Joined Tables
Table Expressions: LATERAL Subqueries
Table Expressions: LEFT OUTER JOIN
Table Expressions: RIGHT OUTER JOIN
Table Expressions: Subqueries
Table Expressions: Table and Column Aliases
Table Expressions: Table Functions
Table Expressions: WHERE Clause
Table Expressions: Window Function Processing
VALUES Lists
WITH Queries
WITH Queries: Data-Modifying Statements in WITH
WITH Queries: SELECT in WITH
Server Configuration
Config: allow_system_table_mods
Config: application_name
Config: archive_command
Config: archive_mode
Config: archive_timeout
Config: array_nulls
Config: authentication_timeout
Config: autovacuum
Config: autovacuum_analyze_scale_factor
Config: autovacuum_analyze_threshold
Config: autovacuum_freeze_max_age
Config: autovacuum_max_workers
Config: autovacuum_multixact_freeze_max_age
Config: autovacuum_naptime
Config: autovacuum_vacuum_cost_delay
Config: autovacuum_vacuum_cost_limit
Config: autovacuum_vacuum_scale_factor
Config: autovacuum_vacuum_threshold
Config: autovacuum_work_mem
Config: backslash_quote
Config: bgwriter_delay
Config: bgwriter_lru_maxpages
Config: bgwriter_lru_multiplier
Config: block_size
Config: bonjour
Config: bonjour_name
Config: bytea_output
Config: checkpoint_completion_target
Config: checkpoint_segments
Config: checkpoint_timeout
Config: checkpoint_warning
Config: check_function_bodies
Config: client_encoding
Config: client_min_messages
Config: commit_delay
Config: commit_siblings
Config: config_file
Config: constraint_exclusion
Config: cpu_index_tuple_cost
Config: cpu_operator_cost
Config: cpu_tuple_cost
Config: cursor_tuple_fraction
Config: data_checksums
Config: data_directory
Config: DateStyle
Config: db_user_namespace
Config: deadlock_timeout
Config: debug_assertions
Config: default_statistics_target
Config: default_tablespace
Config: default_text_search_config
Config: default_transaction_deferrable
Config: default_transaction_isolation
Config: default_transaction_read_only
Config: default_with_oids
Config: dynamic_library_path
Config: dynamic_shared_memory_type
Config: effective_cache_size
Config: effective_io_concurrency
Config: enable_bitmapscan
Config: enable_hashagg
Config: enable_hashjoin
Config: enable_indexonlyscan
Config: enable_indexscan
Config: enable_material
Config: enable_mergejoin
Config: enable_nestloop
Config: enable_seqscan
Config: enable_sort
Config: enable_tidscan
Config: escape_string_warning
Config: event_source
Config: exit_on_error
Config: external_pid_file
Config: extra_float_digits
Config: from_collapse_limit
Config: fsync
Config: full_page_writes
Config: geqo
Config: geqo_effort
Config: geqo_generations
Config: geqo_pool_size
Config: geqo_seed
Config: geqo_selection_bias
Config: geqo_threshold
Config: gin_fuzzy_search_limit
Config: hba_file
Config: hot_standby
Config: hot_standby_feedback
Config: huge_pages
Config: ident_file
Config: ignore_checksum_failure
Config: ignore_system_indexes
Config: integer_datetimes
Config: IntervalStyle
Config: join_collapse_limit
Config: krb_caseins_users
Config: krb_server_keyfile
Config: lc_collate
Config: lc_ctype
Config: lc_messages
Config: lc_monetary
Config: lc_numeric
Config: lc_time
Config: listen_addresses
Config: local_preload_libraries
Config: lock_timeout
Config: logging_collector
Config: log_autovacuum_min_duration
Config: log_checkpoints
Config: log_connections
Config: log_destination
Config: log_directory
Config: log_disconnections
Config: log_duration
Config: log_error_verbosity
Config: log_filename
Config: log_file_mode
Config: log_hostname
Config: log_line_prefix
Config: log_lock_waits
Config: log_min_duration_statement
Config: log_min_error_statement
Config: log_min_messages
Config: log_rotation_age
Config: log_rotation_size
Config: log_statement
Config: log_temp_files
Config: log_timezone
Config: log_truncate_on_rotation
Config: lo_compat_privileges
Config: maintenance_work_mem
Config: max_connections
Config: max_files_per_process
Config: max_function_args
Config: max_identifier_length
Config: max_index_keys
Config: max_locks_per_transaction
Config: max_pred_locks_per_transaction
Config: max_prepared_transactions
Config: max_replication_slots
Config: max_stack_depth
Config: max_standby_archive_delay
Config: max_standby_streaming_delay
Config: max_wal_senders
Config: max_worker_processes
Config: password_encryption
Config: port
Config: post_auth_delay
Config: pre_auth_delay
Config: quote_all_identifiers
Config: random_page_cost
Config: restart_after_crash
Config: search_path
Config: segment_size
Config: seq_page_cost
Config: server_encoding
Config: server_version
Config: server_version_num
Config: session_preload_libraries
Config: session_replication_role
Config: shared_buffers
Config: shared_preload_libraries
Config: sql_inheritance
Config: ssl
Config: ssl_ca_file
Config: ssl_cert_file
Config: ssl_ciphers
Config: ssl_crl_file
Config: ssl_ecdh_curve
Config: ssl_key_file
Config: ssl_prefer_server_ciphers
Config: ssl_renegotiation_limit
Config: standard_conforming_strings
Config: statement_timeout
Config: stats_temp_directory
Config: superuser_reserved_connections
Config: synchronize_seqscans
Config: synchronous_commit
Config: synchronous_standby_names
Config: syslog_facility
Config: syslog_ident
Config: tcp_keepalives_count
Config: tcp_keepalives_idle
Config: tcp_keepalives_interval
Config: temp_buffers
Config: temp_file_limit
Config: temp_tablespaces
Config: TimeZone
Config: timezone_abbreviations
Config: trace_notify
Config: trace_recovery_messages
Config: trace_sort
Config: track_activities
Config: track_activity_query_size
Config: track_counts
Config: track_functions
Config: track_io_timing
Config: transform_null_equals
Config: unix_socket_directories
Config: unix_socket_group
Config: unix_socket_permissions
Config: update_process_title
Config: vacuum_cost_delay
Config: vacuum_cost_limit
Config: vacuum_cost_page_dirty
Config: vacuum_cost_page_hit
Config: vacuum_cost_page_miss
Config: vacuum_defer_cleanup_age
Config: vacuum_freeze_min_age
Config: vacuum_freeze_table_age
Config: vacuum_multixact_freeze_min_age
Config: vacuum_multixact_freeze_table_age
Config: wal_block_size
Config: wal_buffers
Config: wal_debug
Config: wal_keep_segments
Config: wal_level
Config: wal_log_hints
Config: wal_receiver_status_interval
Config: wal_receiver_timeout
Config: wal_segment_size
Config: wal_sender_timeout
Config: wal_sync_method
Config: wal_writer_delay
Config: work_mem
Config: xmlbinary
Config: xmloption
Config: zero_damaged_pages
Server Configuration: Automatic Vacuuming
Server Configuration: Client Connection Defaults
Server Configuration: Connections and Authentication
Server Configuration: Customized Options
Server Configuration: Developer Options
Server Configuration: Error Handling
Server Configuration: Error Reporting and Logging
Server Configuration: File Locations
Server Configuration: Lock Management
Server Configuration: Preset Options
Server Configuration: Query Planning
Server Configuration: Replication
Server Configuration: Resource Consumption
Server Configuration: Run-time Statistics
Server Configuration: Setting Parameters
Server Configuration: Short Options
Server Configuration: Version and Platform Compatibility
Server Configuration: Write Ahead Log
Data Definition
Constraints
Constraints: Check Constraints
Constraints: Exclusion Constraints
Constraints: Foreign Keys
Constraints: Not-Null Constraints
Constraints: Primary Keys
Constraints: Unique Constraints
Default Values
Dependency Tracking
Foreign Data
Inheritance
Modifying Tables
Modifying Tables: Adding a Column
Modifying Tables: Adding a Constraint
Modifying Tables: Changing a Column's Data Type
Modifying Tables: Changing a Column's Default Value
Modifying Tables: Removing a Column
Modifying Tables: Removing a Constraint
Modifying Tables: Renaming a Column
Modifying Tables: Renaming a Table
Partitioning
Partitioning: Alternative Partitioning Methods
Partitioning: Implementing Partitioning
Partitioning: Managing Partitions
Partitioning: Partitioning and Constraint Exclusion
Privileges
Schemas
Schemas: Creating a Schema
Schemas: Public Schema
Schemas: Schema Search Path
Schemas: Schemas and Privileges
Schemas: System Catalog Schema
System Columns
Table Basics
Backup and Restore
Continuous Archiving and Point-in-Time Recovery (PITR)
File System Level Backup
SQL Dump
Managing Databases
Creating a Database
Database Configuration
Destroying a Database
Managing Databases
Tablespaces
Template Databases
Server Setup and Operation
Creating a Database Cluster
Creating a Database Cluster: Use of Network File Systems
Creating a Database Cluster: Use of Secondary File Systems
Encryption Options
Managing Kernel Resources
Managing Kernel Resources: Linux Huge Pages
Managing Kernel Resources: Linux Memory Overcommit
Managing Kernel Resources: Resource Limits
Managing Kernel Resources: Shared Memory and Semaphores
PostgreSQL User Account
Preventing Server Spoofing
Registering Event Log on Windows
Secure TCP/IP Connections with SSH Tunnels
Secure TCP/IP Connections with SSL
Secure TCP/IP Connections with SSL: Client Certificates
Secure TCP/IP Connections with SSL: Creating a Self-signed Certificate
Secure TCP/IP Connections with SSL: SSL Server File Usage
Shutting Down the Server
Starting the Database Server
Starting the Database Server: Client Connection Problems
Starting the Database Server: Server Start-up Failures
Upgrading a PostgreSQL Cluster
Upgrading a PostgreSQL Cluster: Upgrading Data via pg_dumpall
Upgrading a PostgreSQL Cluster: Upgrading Data via pg_upgrade
Upgrading a PostgreSQL Cluster: Upgrading Data via Replication
Functions: Data Type Formatting
Data Type Formatting: to_char
Data Type Formatting: to_date
Data Type Formatting: to_number
Data Type Formatting: to_timestamp
Formatting Functions
Database Roles
Database Roles
Dropping Roles
Function and Trigger Security
Role Attributes
Role Membership
Appendix: Date/Time Support
Date/Time Configuration Files
Date/Time Input Interpretation
Date/Time Key Words
History of Units
Functions: Date/Time
Date/Time Functions and Operators
Date/Time: *
Date/Time: +
Date/Time: -
Date/Time: /
Date/Time: age
Date/Time: AT TIME ZONE
Date/Time: clock_timestamp
Date/Time: current_date
Date/Time: current_time
Date/Time: current_timestamp
Date/Time: date_part
Date/Time: date_trunc
Date/Time: extract
Date/Time: EXTRACT, date_part
Date/Time: isfinite
Date/Time: justify_days
Date/Time: justify_hours
Date/Time: justify_interval
Date/Time: localtime
Date/Time: localtimestamp
Date/Time: make_date
Date/Time: make_interval
Date/Time: make_time
Date/Time: make_timestamp
Date/Time: make_timestamptz
Date/Time: now
Date/Time: statement_timestamp
Date/Time: timeofday
Date/Time: transaction_timestamp
Data Manipulation
Deleting Data
Inserting Data
Returning Data From Modified Rows
Updating Data
Full Text Search
Full Text Search
Full Text Search: Additional Features
Full Text Search: Configuration Example
Full Text Search: Controlling Text Search
Full Text Search: Dictionaries
Full Text Search: GiST and GIN Index Types
Full Text Search: Limitations
Full Text Search: Parsers
Full Text Search: psql Support
Full Text Search: Tables and Indexes
Full Text Search: Testing and Debugging Text Search
Internals: Genetic Query Optimizer
Genetic Query Optimizer: Further Reading
Genetic Query Optimizer: Genetic Algorithms
Genetic Query Optimizer: Genetic Query Optimization (GEQO) in PostgreSQL
Genetic Query Optimizer: Query Handling as a Complex Optimization Problem
Functions: Geometric
Geometric Functions and Operators
Geometric: #
Geometric: ##
Geometric: &&
Geometric: &<
Geometric: &<|
Geometric: &>
Geometric: *
Geometric: +
Geometric: -
Geometric: /
Geometric: <->
Geometric: <<
Geometric: <<|
Geometric: <@
Geometric: <^
Geometric: >>
Geometric: >^
Geometric: ?#
Geometric: ?-
Geometric: ?-|
Geometric: ?|
Geometric: ?||
Geometric: @-@
Geometric: @>
Geometric: @@
Geometric: area
Geometric: box
Geometric: center
Geometric: circle
Geometric: diameter
Geometric: height
Geometric: isclosed
Geometric: isopen
Geometric: length
Geometric: line
Geometric: lseg
Geometric: npoints
Geometric: path
Geometric: pclose
Geometric: point
Geometric: polygon
Geometric: popen
Geometric: radius
Geometric: width
Geometric: |&>
Geometric: |>>
Geometric: ~=
Internals: GIN Indexes
GIN Indexes: Built-in Operator Classes
GIN Indexes: Examples
GIN Indexes: Extensibility
GIN Indexes: GIN Tips and Tricks
GIN Indexes: Implementation
GIN Indexes: Limitations
Internals: GIN Indexes
Internals: GiST Indexes
GiST Indexes: Built-in Operator Classes
GiST Indexes: Examples
GiST Indexes: Extensibility
GiST Indexes: Implementation
Internals: GiST Indexes
Internals: Index Access Method
Index Access Method: Catalog Entries for Indexes
Index Access Method: Index Access Method Functions
Index Access Method: Index Cost Estimation Functions
Index Access Method: Index Locking Considerations
Index Access Method: Index Scanning
Index Access Method: Index Uniqueness Checks
Functions: System Information
Information Functions
System Information: collation for
System Information: col_description
System Information: current_catalog
System Information: current_database
System Information: current_query
System Information: current_role
System Information: current_schema
System Information: current_schemas
System Information: current_user
System Information: format_type
System Information: has_any_column_privilege
System Information: has_column_privilege
System Information: has_database_privilege
System Information: has_foreign_data_wrapper_privilege
System Information: has_function_privilege
System Information: has_language_privilege
System Information: has_schema_privilege
System Information: has_sequence_privilege
System Information: has_server_privilege
System Information: has_tablespace_privilege
System Information: has_table_privilege
System Information: has_type_privilege
System Information: inet_client_addr
System Information: inet_client_port
System Information: inet_server_addr
System Information: inet_server_port
System Information: obj_description
System Information: pg_backend_pid
System Information: pg_collation_is_visible
System Information: pg_conf_load_time
System Information: pg_conversion_is_visible
System Information: pg_describe_object
System Information: pg_function_is_visible
System Information: pg_get_constraintdef
System Information: pg_get_expr
System Information: pg_get_functiondef
System Information: pg_get_function_arguments
System Information: pg_get_function_identity_arguments
System Information: pg_get_function_result
System Information: pg_get_indexdef
System Information: pg_get_keywords
System Information: pg_get_ruledef
System Information: pg_get_serial_sequence
System Information: pg_get_triggerdef
System Information: pg_get_userbyid
System Information: pg_get_viewdef
System Information: pg_has_role
System Information: pg_identify_object
System Information: pg_is_other_temp_schema
System Information: pg_listening_channels
System Information: pg_my_temp_schema
System Information: pg_opclass_is_visible
System Information: pg_operator_is_visible
System Information: pg_opfamily_is_visible
System Information: pg_options_to_table
System Information: pg_postmaster_start_time
System Information: pg_tablespace_databases
System Information: pg_tablespace_location
System Information: pg_table_is_visible
System Information: pg_trigger_depth
System Information: pg_ts_config_is_visible
System Information: pg_ts_dict_is_visible
System Information: pg_ts_parser_is_visible
System Information: pg_ts_template_is_visible
System Information: pg_typeof
System Information: pg_type_is_visible
System Information: session_user
System Information: shobj_description
System Information: to_regclass
System Information: to_regoper
System Information: to_regoperator
System Information: to_regproc
System Information: to_regprocedure
System Information: to_regtype
System Information: txid_current
System Information: txid_current_snapshot
System Information: txid_snapshot_xip
System Information: txid_snapshot_xmax
System Information: txid_snapshot_xmin
System Information: txid_visible_in_snapshot
System Information: user
System Information: version
Internals
Internals: Executor
Internals: How Connections are Established
Internals: Parser Stage
Internals: Path of a Query
Internals: Planner Statistics and Security
Internals: Planner/Optimizer
Internals: PostgreSQL Rule System
Internals: Row Estimation Examples
Internals: SP-GiST Indexes
Internals: SP-GiST Indexes
SP-GiST Indexes: Built-in Operator Classes
SP-GiST Indexes: Examples
SP-GiST Indexes: Extensibility
SP-GiST Indexes: Implementation
Functions: JSON
JSON Functions and Operators
JSON: #>
JSON: #>>
JSON: ->
JSON: ->>
JSON: <@
JSON: ?
JSON: ?&
JSON: ?|
JSON: @>
JSON: array_to_json
JSON: jsonb_array_elements
JSON: jsonb_array_elements_text
JSON: jsonb_array_length
JSON: jsonb_each
JSON: jsonb_each_text
JSON: jsonb_extract_path
JSON: jsonb_extract_path_text
JSON: jsonb_object_keys
JSON: jsonb_populate_record
JSON: jsonb_populate_recordset
JSON: jsonb_to_record
JSON: jsonb_to_recordset
JSON: jsonb_typeof
JSON: json_array_elements
JSON: json_array_elements_text
JSON: json_array_length
JSON: json_build_array
JSON: json_build_object
JSON: json_each
JSON: json_each_text
JSON: json_extract_path
JSON: json_extract_path_text
JSON: json_object
JSON: json_object_keys
JSON: json_populate_record
JSON: json_populate_recordset
JSON: json_to_record
JSON: json_to_recordset
JSON: json_typeof
JSON: row_to_json
JSON: to_json
Maintenance
Log File Maintenance
Routine Reindexing
Routine Vacuuming
Functions: Mathematical
Mathematical Functions and Operators
Mathematical: !
Mathematical: !!
Mathematical: #
Mathematical: %
Mathematical: &
Mathematical: *
Mathematical: +
Mathematical: -
Mathematical: /
Mathematical: <<
Mathematical: >>
Mathematical: @
Mathematical: abs
Mathematical: acos
Mathematical: asin
Mathematical: atan
Mathematical: atan2
Mathematical: cbrt
Mathematical: ceil
Mathematical: ceiling
Mathematical: cos
Mathematical: cot
Mathematical: degrees
Mathematical: div
Mathematical: exp
Mathematical: floor
Mathematical: ln
Mathematical: log
Mathematical: mod
Mathematical: pi
Mathematical: power
Mathematical: radians
Mathematical: random
Mathematical: round
Mathematical: setseed
Mathematical: sign
Mathematical: sin
Mathematical: sqrt
Mathematical: tan
Mathematical: trunc
Mathematical: width_bucket
Mathematical: ^
Mathematical: |
Mathematical: |/
Mathematical: ||/
Mathematical: ~
Monitoring
Monitoring: Determining Disk Usage
Monitoring: Disk Full Failure
Monitoring: Dynamic Tracing
Monitoring: Standard Unix Tools
Monitoring: Statistics Collector
Monitoring: Viewing Locks
Functions: Network Address
Network Address Functions and Operators
Network Address: &
Network Address: &&
Network Address: +
Network Address: -
Network Address: <
Network Address: <<
Network Address: <<=
Network Address: <=
Network Address: <>
Network Address: =
Network Address: >
Network Address: >=
Network Address: >>
Network Address: >>=
Network Address: abbrev
Network Address: broadcast
Network Address: family
Network Address: host
Network Address: hostmask
Network Address: masklen
Network Address: netmask
Network Address: network
Network Address: set_masklen
Network Address: text
Network Address: trunc
Network Address: |
Network Address: ~
Performance Tips
Performance Tips: Controlling the Planner with Explicit JOIN Clauses
Performance Tips: EXPLAIN
Performance Tips: Non-Durable Settings
Performance Tips: Populating a Database
Performance Tips: Statistics Used by the Planner
Internals: Physical Storage
Physical Storage: Database File Layout
Physical Storage: Database Page Layout
Physical Storage: Free Space Map
Physical Storage: Initialization Fork
Physical Storage: TOAST
Physical Storage: Visibility Map
Functions: Range
Range Functions and Operators
Range: &&
Range: &<
Range: &>
Range: *
Range: +
Range: -
Range: -|-
Range: <
Range: <<
Range: <=
Range: <>
Range: <@
Range: =
Range: >
Range: >=
Range: >>
Range: @>
Range: isempty
Range: lower
Range: lower_inc
Range: lower_inf
Range: upper
Range: upper_inc
Range: upper_inf
Functions: String
String Functions and Operators
String: ascii
String: bit_length
String: btrim
String: character_length
String: char_length
String: chr
String: concat
String: concat_ws
String: convert
String: convert_from
String: convert_to
String: decode
String: encode
String: format
String: initcap
String: left
String: length
String: lower
String: lpad
String: ltrim
String: md5
String: octet_length
String: overlay
String: pg_client_encoding
String: position
String: quote_ident
String: quote_literal
String: quote_nullable
String: regexp_matches
String: regexp_replace
String: regexp_split_to_array
String: regexp_split_to_table
String: repeat
String: replace
String: reverse
String: right
String: rpad
String: rtrim
String: split_part
String: strpos
String: substr
String: substring
String: to_ascii
String: to_hex
String: translate
String: trim
String: upper
String: ||
Logical Decoding
Synchronous Replication Support for Logical Decoding
Functions: Text Search
Text Search Functions and Operators
Text Search: !!
Text Search: &&
Text Search: <@
Text Search: @>
Text Search: @@
Text Search: @@@
Text Search: get_current_ts_config
Text Search: length
Text Search: numnode
Text Search: plainto_tsquery
Text Search: querytree
Text Search: setweight
Text Search: strip
Text Search: to_tsquery
Text Search: to_tsvector
Text Search: tsvector_update_trigger
Text Search: tsvector_update_trigger_column
Text Search: ts_debug
Text Search: ts_headline
Text Search: ts_lexize
Text Search: ts_parse
Text Search: ts_rank
Text Search: ts_rank_cd
Text Search: ts_rewrite
Text Search: ts_stat
Text Search: ts_token_type
Text Search: ||
Type Conversion
Type Conversion
Type Conversion: Functions
Type Conversion: Operators
Type Conversion: UNION, CASE, and Related Constructs
Type Conversion: Value Storage
Functions: Window
Window Functions
Window: cume_dist
Window: dense_rank
Window: first_value
Window: lag
Window: last_value
Window: lead
Window: nth_value
Window: ntile
Window: percent_rank
Window: rank
Window: row_number
Functions: XML
XML Functions
XML: IS DOCUMENT
XML: xmlagg
XML: xmlcomment
XML: xmlconcat
XML: xmlelement
XML: XMLEXISTS
XML: xmlforest
XML: xmlpi
XML: xmlroot
XML: xml_is_well_formed
Index
index