select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Search PostgreSQL documentation

PG 18 · Browse by category, or enter a name or keyword

Category index4025
CREATE USERManual ChaptersPG18CREATE USER CREATE USER — define a new database role Synopsis CREATE USER name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE |…CREATE USER CREATE USER MAPPINGManual ChaptersPG18CREATE USER MAPPING CREATE USER MAPPING — define a new mapping of a user to a foreign server Synopsis CREATE USER MAPPING [ IF NOT EXISTS ] FOR { user_name | USER | CURRENT_ROLE | CURRENT_US…CREATE USER MAPPING CREATE VIEWManual ChaptersPG18CREATE VIEW CREATE VIEW — define a new view Synopsis CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW name [ ( column_name [, ...] ) ] [ WITH ( view_option_name [= view_option_v…CREATE VIEW createdbManual ChaptersPG18createdb createdb — create a new PostgreSQL database Synopsis createdb [connection-option...] [option...] [dbname [description]]createdb createuserManual ChaptersPG18createuser createuser — define a new PostgreSQL user account Synopsis createuser [connection-option...] [option...] [username]createuser Creating a DatabaseManual ChaptersPG1822.2. Creating a Database In order to create a database, the PostgreSQL server must be up and running (see Section 18.3). Databases are created with the SQL command CREATE DATABASE: CREATE D…Creating a Database Creating a DatabaseManual ChaptersPG181.3. Creating a Database The first test to see whether you can access the database server is to try to create a database. A running PostgreSQL server can manage many databases. Typically, a …Creating a Database Creating a Database ClusterManual ChaptersPG1818.2. Creating a Database Cluster Before you can do anything, you must initialize a database storage area on disk. We call this a database cluster. (The SQL standard uses the term catalog cl…Creating a Database Cluster Creating a Large ObjectManual ChaptersPG1833.3.1. Creating a Large Object The function Oid lo_create(PGconn *conn, Oid lobjId); creates a new large object. The OID to be assigned can be specified by lobjId; if so, failure occurs if …Creating a Large Object Creating a New TableManual ChaptersPG182.3. Creating a New Table You can create a new table by specifying the table name, along with all column names and their types: CREATE TABLE weather ( city varchar(80), temp_lo int, -- low t…Creating a New Table Creating a SchemaManual ChaptersPG185.10.1. Creating a Schema To create a schema, use the CREATE SCHEMA command. Give the schema a name of your choice. For example: CREATE SCHEMA myschema; To create or access objects in a sche…Creating a Schema Creating and Maintaining Message CatalogsManual ChaptersPG1856.1.3. Creating and Maintaining Message Catalogs OK, so how does one create a “blank” message catalog? First, go into the directory that contains the program whose messages you want to tran…Creating and Maintaining Message Catalogs Creating CertificatesManual ChaptersPG1818.9.5. Creating Certificates To create a simple self-signed certificate for the server, valid for 365 days, use the following OpenSSL command, replacing dbhost.yourdomain.com with the serve…Creating Certificates Creating Custom Scan PathsManual ChaptersPG1860.1. Creating Custom Scan Paths A custom scan provider will typically add paths for a base relation by setting the following hook, which is called after the core code has generated all the …Creating Custom Scan Paths Creating Custom Scan PlansManual ChaptersPG1860.2. Creating Custom Scan Plans A custom scan is represented in a finished plan tree using the following structure: typedef struct CustomScan { Scan scan; uint32 flags; List *custom_plans; …Creating Custom Scan Plans Creating Event TriggersManual ChaptersPG1838.1.7. Creating Event Triggers Event triggers are created using the command CREATE EVENT TRIGGER. In order to create an event trigger, you must first create a function with the special retu…Creating Event Triggers Creating IndexesManual ChaptersPG1812.2.2. Creating Indexes We can create a GIN index (Section 12.9) to speed up text searches: CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body)); Notice that the 2-argum…Creating Indexes Creating New Collation ObjectsManual ChaptersPG1823.2.2.3. Creating New Collation Objects If the standard and predefined collations are not sufficient, users can create their own collation objects using the SQL command CREATE COLLATION. Th…Creating New Collation Objects Creating XML ValuesManual ChaptersPG188.13.1. Creating XML Values To produce a value of type xml from character data, use the function xmlparse: XMLPARSE ( { DOCUMENT | CONTENT } value) Examples: XMLPARSE (DOCUMENT '<?xml versio…Creating XML Values CreditsManual ChaptersPG18F.10.6. Credits Original author: Gene Selkov, Jr. <selkovjr@mcs.anl.gov>, Mathematics and Computer Science Division, Argonne National Laboratory. My thanks are primarily to Prof. Joe Hellers…Credits CreditsManual ChaptersPG18F.39.6. Credits Original author: Gene Selkov, Jr. <selkovjr@mcs.anl.gov>, Mathematics and Computer Science Division, Argonne National Laboratory. My thanks are primarily to Prof. Joe Hellers…Credits Cross-Version CompatibilityManual ChaptersPG18F.38.7. Cross-Version Compatibility postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that po…Cross-Version Compatibility crosstab(text)Manual ChaptersPG18F.43.1.2. crosstab(text) crosstab(text sql) crosstab(text sql, int N) The crosstab function is used to produce “pivot” displays, wherein data is listed across the page rather than down. For …crosstab(text) crosstab(text, text)Manual ChaptersPG18F.43.1.4. crosstab(text, text) crosstab(text source_sql, text category_sql) The main limitation of the single-parameter form of crosstab is that it treats all values in a group alike, insert…crosstab(text, text) crosstabN(text)Manual ChaptersPG18F.43.1.3. crosstabN(text) crosstabN(text sql) The crosstabN functions are examples of how to set up custom wrappers for the general crosstab function, so that you need not write out column n…crosstabN(text) crypt()Manual ChaptersPG18F.26.2.1. crypt() crypt(password text, salt text) returns text Calculates a crypt(3)-style hash of password. When storing a new password, you need to use gen_salt() to generate a new salt va…crypt() CSV FormatManual ChaptersPG18CSV Format This format option is used for importing and exporting the Comma- Separated Value (CSV) file format used by many other programs, such as spreadsheets. Instead of the escaping rule…CSV Format cube — a multi-dimensional cube data typeManual ChaptersPG18F.10. cube — a multi-dimensional cube data type This module implements a data type cube for representing multidimensional cubes. This module is considered “trusted”, that is, it can be insta…cube — a multi-dimensional cube data type Cube-Based Earth DistancesManual ChaptersPG18F.14.1. Cube-Based Earth Distances Data is stored in cubes that are points (both corners are the same) using 3 coordinates representing the x, y, and z distance from the center of the Earth.…Cube-Based Earth Distances Cumulative Query and Index StatisticsManual ChaptersPG1819.9.1. Cumulative Query and Index Statistics These parameters control the server-wide cumulative statistics system. When enabled, the data that is collected can be accessed via the pg_stat …Cumulative Query and Index Statistics Current Date/TimeManual ChaptersPG189.9.5. Current Date/Time PostgreSQL provides a number of functions that return values related to the current date and time. These SQL-standard functions all return values based on the start …Current Date/Time CursorsManual ChaptersPG1841.7. Cursors Rather than executing a whole query at once, it is possible to set up a cursor that encapsulates the query, and then read the query result a few rows at a time. One reason for …Cursors Custom Cumulative StatisticsManual ChaptersPG1836.10.15. Custom Cumulative Statistics It is possible for add-ins written in C-language to use custom types of cumulative statistics registered in the Cumulative Statistics System. First, de…Custom Cumulative Statistics Custom Scan Execution CallbacksManual ChaptersPG1860.3.1. Custom Scan Execution Callbacks void (*BeginCustomScan) (CustomScanState *node, EState *estate, int eflags); Complete initialization of the supplied CustomScanState. Standard fields …Custom Scan Execution Callbacks Custom Scan Path CallbacksManual ChaptersPG1860.1.1. Custom Scan Path Callbacks Plan *(*PlanCustomPath) (PlannerInfo *root, RelOptInfo *rel, CustomPath *best_path, List *tlist, List *clauses, List *custom_plans); Convert a custom path …Custom Scan Path Callbacks Custom Scan Plan CallbacksManual ChaptersPG1860.2.1. Custom Scan Plan Callbacks Node *(*CreateCustomScanState) (CustomScan *cscan); Allocate a CustomScanState for this CustomScan. The actual allocation will often be larger than require…Custom Scan Plan Callbacks Custom ScriptsManual ChaptersPG18Custom Scripts pgbench has support for running custom benchmark scenarios by replacing the default transaction script (described above) with a transaction script read from a file (-f option)…Custom Scripts Custom Server SettingsManual ChaptersPG1831.1.5. Custom Server Settings There are several ways to use custom server settings when running a test suite. This can be useful to enable additional logging, adjust resource limits, or ena…Custom Server Settings Custom Wait EventsManual ChaptersPG1836.10.13. Custom Wait Events Add-ins can define custom wait events under the wait event type Extension by calling: uint32 WaitEventExtensionNew(const char *wait_event_name) The wait event is…Custom Wait Events Custom WAL Resource ManagersManual ChaptersPG1864.2. Custom WAL Resource Managers This section explains the interface between the core PostgreSQL system and custom WAL resource managers, which enable extensions to integrate directly with…Custom WAL Resource Managers
More results

Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.

pg17: choose a version ex: extensions only select open