Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index4025
tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLEF.47. tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
The tsm_system_time module provides the table sampling method SYSTEM_TIME, which can be used in the TABLESAMPLE clause…tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
tsquery8.11.2. tsquery
A tsquery value stores lexemes that are to be searched for, and can combine them using the Boolean operators & (AND), | (OR), and ! (NOT), as well as the phrase search operat…tsquery
tsvector8.11.1. tsvector
A tsvector value is a sorted list of distinct lexemes, which are words that have been normalized to merge different variants of the same word (see Chapter 12 for details). S…tsvector
TuplesTuples
Each tuple begins with a 16-bit integer count of the number of fields in the tuple. (Presently, all tuples in a table will have the same count, but that might not always be true.) The…Tuples
TutorialPart I. Tutorial
Welcome to the PostgreSQL Tutorial. The tutorial is intended to give an introduction to PostgreSQL, relational database concepts, and the SQL language. We assume some genera…Tutorial
Two-phase Commit Support for Logical Decoding47.10. Two-phase Commit Support for Logical Decoding
With the basic output plugin callbacks (eg., begin_cb, change_cb, commit_cb and message_cb) two-phase commit commands like PREPARE TRANSA…Two-phase Commit Support for Logical Decoding
Two-Phase Transactions67.4. Two-Phase Transactions
PostgreSQL supports a two-phase commit (2PC) protocol that allows multiple distributed systems to work together in a transactional manner. The commands are PREPA…Two-Phase Transactions
TYPETYPE TYPE — define a new data type
Synopsis TYPE type_name IS ctypeTYPE
Type Casts4.2.9. Type Casts
A type cast specifies a conversion from one data type to another. PostgreSQL accepts two equivalent syntaxes for type casts:
CAST ( expression AS type ) expression::type
Th…Type Casts
Type ConversionChapter 10. Type Conversion
SQL statements can, intentionally or not, require the mixing of different data types in the same expression. PostgreSQL has extensive facilities for evaluating mi…Type Conversion
Type Mapping34.4.4. Type Mapping
When ECPG applications exchange values between the PostgreSQL server and the C application, such as when retrieving query results from the server or executing SQL statem…Type Mapping
Type Safety8.7.3. Type Safety
Each enumerated data type is separate and cannot be compared with other enumerated types. See this example:
CREATE TYPE happiness AS ENUM ('happy', 'very happy', 'ecstatic…Type Safety
Typed TablesTyped Tables
Typed tables implement a subset of the SQL standard. According to the standard, a typed table has columns corresponding to the underlying composite type as well as one other col…Typed Tables
Typedefs34.4.4.3.3. Typedefs
Use the typedef keyword to map new types to already existing types.
EXEC SQL BEGIN DECLARE SECTION; typedef char mychartype[40]; typedef long serial_t; EXEC SQL END DECL…Typedefs
udt_privileges35.58. udt_privileges
The view udt_privileges identifies USAGE privileges granted on user-defined types to a currently enabled role or by a currently enabled role. There is one row for each …udt_privileges
unaccent — a text search dictionary which removes diacriticsF.48. unaccent — a text search dictionary which removes diacritics
unaccent is a text search dictionary that removes accents (diacritic signs) from lexemes. It's a filtering dictionary, whic…unaccent — a text search dictionary which removes diacritics
unicode-modeF.26.3.8.11. unicode-mode
Whether to convert textual data from database internal encoding to UTF-8 and back. If your database already is UTF-8, no conversion will be done, but the message wi…unicode-mode
UNION ClauseUNION Clause
The UNION clause has this general form:
select_statement UNION [ ALL | DISTINCT ] select_statement
select_statement is any SELECT statement without an ORDER BY, LIMIT, FOR NO KE…UNION Clause
UNION, CASE, and Related Constructs10.5. UNION, CASE, and Related Constructs
SQL UNION constructs must match up possibly dissimilar types to become a single result set. The resolution algorithm is applied separately to each o…UNION, CASE, and Related Constructs
Unique Constraints5.5.3. Unique Constraints
Unique constraints ensure that the data contained in a column, or a group of columns, is unique among all the rows in the table. The syntax is:
CREATE TABLE product…Unique Constraints
Unique Indexes11.6. Unique Indexes
Indexes can also be used to enforce uniqueness of a column's value, or the uniqueness of the combined values of more than one column.
CREATE UNIQUE INDEX name ON table (…Unique Indexes
UNLISTENUNLISTEN UNLISTEN — stop listening for a notification
Synopsis UNLISTEN { channel | * }UNLISTEN
Unsupported FeaturesD.2. Unsupported Features
The following features defined in SQL:2023 are not implemented in this release of PostgreSQL. In a few cases, equivalent functionality is available.
Identifier Core…Unsupported Features
Updatability OptionsF.38.1.7. Updatability Options
By default all foreign tables using postgres_fdw are assumed to be updatable. This may be overridden using the following option:
updatable (boolean) This optio…Updatability Options
Updatable ViewsUpdatable Views
Simple views are automatically updatable: the system will allow INSERT, UPDATE, DELETE, and MERGE statements to be used on the view in the same way as on a regular table. A v…Updatable Views
UPDATEUPDATE UPDATE — update rows of a table
Synopsis [ WITH [ RECURSIVE ] with_query [, ...] ] UPDATE [ ONLY ] table_name [ * ] [ [ AS ] alias ] SET { column_name = { expression | DEFAULT } | ( c…UPDATE
UPDATE Transformations29.4.3. UPDATE Transformations
Whenever an UPDATE is processed, the row filter expression is evaluated for both the old and new row (i.e. using the data before and after the update). If both…UPDATE Transformations
UPDATE/DELETE WHERE CURRENT OF41.7.3.3. UPDATE/DELETE WHERE CURRENT OF
UPDATE table SET ... WHERE CURRENT OF cursor; DELETE FROM table WHERE CURRENT OF cursor;
When a cursor is positioned on a table row, that row can be …UPDATE/DELETE WHERE CURRENT OF
Updates2.8. Updates
You can update existing rows using the UPDATE command. Suppose you discover the temperature readings are all off by 2 degrees after November 28. You can correct the data as foll…Updates
Updating a View39.2.4. Updating a View
What happens if a view is named as the target relation for an INSERT, UPDATE, DELETE, or MERGE? Doing the substitutions described above would give a query tree in whi…Updating a View
Updating Data6.2. Updating Data
The modification of data that is already in the database is referred to as updating. You can update individual rows, all the rows in a table, or a subset of all rows. Each…Updating Data
Updating Planner Statistics24.1.3. Updating Planner Statistics
The PostgreSQL query planner relies on statistical information about the contents of tables in order to generate good plans for queries. These statistics …Updating Planner Statistics
Updating the Visibility Map24.1.4. Updating the Visibility Map
Vacuum maintains a visibility map for each table to keep track of which pages contain only tuples that are known to be visible to all active transactions …Updating the Visibility Map
Upgrade29.13. Upgrade
Migration of logical replication clusters is possible only when all the members of the old logical replication clusters are version 17.0 or later.Upgrade
Upgrading a PostgreSQL Cluster18.6. Upgrading a PostgreSQL Cluster
This section discusses how to upgrade your database data from one PostgreSQL release to a newer one.
Current PostgreSQL version numbers consist of a majo…Upgrading a PostgreSQL Cluster
Upgrading Data via pg_dumpall18.6.1. Upgrading Data via pg_dumpall
One upgrade method is to dump data from one major version of PostgreSQL and restore it in another — to do this, you must use a logical backup tool like …Upgrading Data via pg_dumpall
Upgrading Data via pg_upgrade18.6.2. Upgrading Data via pg_upgrade
The pg_upgrade module allows an installation to be migrated in-place from one major PostgreSQL version to another. Upgrades can be performed in minutes,…Upgrading Data via pg_upgrade
Upgrading Data via Replication18.6.3. Upgrading Data via Replication
It is also possible to use logical replication methods to create a standby server with the updated version of PostgreSQL. This is possible because logi…Upgrading Data via Replication
Upgrading Logical Replication Clusters29.13.3. Upgrading Logical Replication Clusters
While upgrading a subscriber, write operations can be performed in the publisher. These changes will be replicated to the subscriber once the …Upgrading Logical Replication Clusters
UsageUsageUsage
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open