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
Date/Time OutputManual ChaptersPG188.5.2. Date/Time Output The output format of the date/time types can be set to one of the four styles ISO 8601, SQL (Ingres), traditional POSTGRES (Unix date format), or German. The default …Date/Time Output Date/Time SupportManual ChaptersPG18Appendix B. Date/Time Support PostgreSQL uses an internal heuristic parser for all date/time input support. Dates and times are input as strings, and are broken up into distinct fields with …Date/Time Support Date/Time TypesManual ChaptersPG188.5. Date/Time Types PostgreSQL supports the full set of SQL date and time types, shown in Table 8.9. The operations available on these data types are described in Section 9.9. Dates are cou…Date/Time Types date_binManual ChaptersPG189.9.3. date_bin The function date_bin “bins” the input timestamp into the specified interval (the stride) aligned with a specified origin. date_bin(stride, source, origin) source is a value …date_bin date_truncManual ChaptersPG189.9.2. date_trunc The function date_trunc is conceptually similar to the trunc function for numbers. date_trunc(field, source [, time_zone ]) source is a value expression of type timestamp, …date_trunc DatesManual ChaptersPG188.5.1.1. Dates Table 8.10 shows some possible inputs for the date type. Table 8.10. Date Input Example Description 1999-01-08 ISO 8601; January 8 in any mode (recommended format) January 8, …Dates dblinkManual ChaptersPG18dblink dblink — executes a query in a remote database Synopsis dblink(text connname, text sql [, bool fail_on_error]) returns setof record dblink(text connstr, text sql [, bool fail_on_error…dblink dblink — connect to other PostgreSQL databasesManual ChaptersPG18F.11. dblink — connect to other PostgreSQL databases dblink is a module that supports connections to other PostgreSQL databases from within a database session. dblink can report the followin…dblink — connect to other PostgreSQL databases dblink_build_sql_deleteManual ChaptersPG18dblink_build_sql_delete dblink_build_sql_delete — builds a DELETE statement using supplied values for primary key field values Synopsis dblink_build_sql_delete(text relname, int2vector prima…dblink_build_sql_delete dblink_build_sql_insertManual ChaptersPG18dblink_build_sql_insert dblink_build_sql_insert — builds an INSERT statement using a local tuple, replacing the primary key field values with alternative supplied values Synopsis dblink_buil…dblink_build_sql_insert dblink_build_sql_updateManual ChaptersPG18dblink_build_sql_update dblink_build_sql_update — builds an UPDATE statement using a local tuple, replacing the primary key field values with alternative supplied values Synopsis dblink_buil…dblink_build_sql_update dblink_cancel_queryManual ChaptersPG18dblink_cancel_query dblink_cancel_query — cancels any active query on the named connection Synopsis dblink_cancel_query(text connname) returns textdblink_cancel_query dblink_closeManual ChaptersPG18dblink_close dblink_close — closes a cursor in a remote database Synopsis dblink_close(text cursorname [, bool fail_on_error]) returns text dblink_close(text connname, text cursorname [, boo…dblink_close dblink_connectManual ChaptersPG18dblink_connect dblink_connect — opens a persistent connection to a remote database Synopsis dblink_connect(text connstr) returns text dblink_connect(text connname, text connstr) returns textdblink_connect dblink_connect_uManual ChaptersPG18dblink_connect_u dblink_connect_u — opens a persistent connection to a remote database, insecurely Synopsis dblink_connect_u(text connstr) returns text dblink_connect_u(text connname, text c…dblink_connect_u dblink_disconnectManual ChaptersPG18dblink_disconnect dblink_disconnect — closes a persistent connection to a remote database Synopsis dblink_disconnect() returns text dblink_disconnect(text connname) returns textdblink_disconnect dblink_error_messageManual ChaptersPG18dblink_error_message dblink_error_message — gets last error message on the named connection Synopsis dblink_error_message(text connname) returns textdblink_error_message dblink_execManual ChaptersPG18dblink_exec dblink_exec — executes a command in a remote database Synopsis dblink_exec(text connname, text sql [, bool fail_on_error]) returns text dblink_exec(text connstr, text sql [, bool…dblink_exec dblink_fetchManual ChaptersPG18dblink_fetch dblink_fetch — returns rows from an open cursor in a remote database Synopsis dblink_fetch(text cursorname, int howmany [, bool fail_on_error]) returns setof record dblink_fetch…dblink_fetch dblink_get_connectionsManual ChaptersPG18dblink_get_connections dblink_get_connections — returns the names of all open named dblink connections Synopsis dblink_get_connections() returns text[]dblink_get_connections dblink_get_notifyManual ChaptersPG18dblink_get_notify dblink_get_notify — retrieve async notifications on a connection Synopsis dblink_get_notify() returns setof (notify_name text, be_pid int, extra text) dblink_get_notify(tex…dblink_get_notify dblink_get_pkeyManual ChaptersPG18dblink_get_pkey dblink_get_pkey — returns the positions and field names of a relation's primary key fields Synopsis dblink_get_pkey(text relname) returns setof dblink_pkey_resultsdblink_get_pkey dblink_get_resultManual ChaptersPG18dblink_get_result dblink_get_result — gets an async query result Synopsis dblink_get_result(text connname [, bool fail_on_error]) returns setof recorddblink_get_result dblink_is_busyManual ChaptersPG18dblink_is_busy dblink_is_busy — checks if connection is busy with an async query Synopsis dblink_is_busy(text connname) returns intdblink_is_busy dblink_openManual ChaptersPG18dblink_open dblink_open — opens a cursor in a remote database Synopsis dblink_open(text cursorname, text sql [, bool fail_on_error]) returns text dblink_open(text connname, text cursorname, …dblink_open dblink_send_queryManual ChaptersPG18dblink_send_query dblink_send_query — sends an async query to a remote database Synopsis dblink_send_query(text connname, text sql) returns intdblink_send_query DDL PermissionsManual ChaptersPG18F.40.5.3. DDL Permissions SELinux defines several permissions to control common operations for each object type; such as creation, alter, drop and relabel of security label. In addition, sev…DDL Permissions ddl_command_endManual ChaptersPG1838.1.3. ddl_command_end The ddl_command_end event occurs just after the execution of the same set of commands as ddl_command_start. To obtain more details on the DDL operations that took pla…ddl_command_end ddl_command_startManual ChaptersPG1838.1.2. ddl_command_start The ddl_command_start event occurs just before the execution of a DDL command. DDL commands in this context are: CREATE ALTER DROP COMMENT GRANT IMPORT FOREIGN SCHE…ddl_command_start DeadlocksManual ChaptersPG1813.3.4. Deadlocks The use of explicit locking can increase the likelihood of deadlocks, wherein two (or more) transactions each hold locks that the other wants. For example, if transaction 1…Deadlocks DEALLOCATEManual ChaptersPG18DEALLOCATE DEALLOCATE — deallocate a prepared statement Synopsis DEALLOCATE [ PREPARE ] { name | ALL }DEALLOCATE DEALLOCATE DESCRIPTORManual ChaptersPG18DEALLOCATE DESCRIPTOR DEALLOCATE DESCRIPTOR — deallocate an SQL descriptor area Synopsis DEALLOCATE DESCRIPTOR nameDEALLOCATE DESCRIPTOR Debian PackagesManual ChaptersPG18J.2.3. Debian Packages There is a full set of packages of the documentation tools available for Debian GNU/Linux. To install, simply use: apt-get install docbook-xml docbook-xsl libxml2-util…Debian Packages Debugging and Developer SettingsManual ChaptersPG1832.20.2. Debugging and Developer Settings A "dangerous debugging mode" may be enabled by setting the environment variable PGOAUTHDEBUG=UNSAFE. This functionality is provided for ease of loca…Debugging and Developer Settings Declaration of Array TypesManual ChaptersPG188.15.1. Declaration of Array Types To illustrate the use of array types, we create this table: CREATE TABLE sal_emp ( name text, pay_by_quarter integer[], schedule text[][] ); As shown, an a…Declaration of Array Types Declaration of Composite TypesManual ChaptersPG188.16.1. Declaration of Composite Types Here are two simple examples of defining composite types: CREATE TYPE complex AS ( r double precision, i double precision ); CREATE TYPE inventory_item…Declaration of Composite Types Declaration of Enumerated TypesManual ChaptersPG188.7.1. Declaration of Enumerated Types Enum types are created using the CREATE TYPE command, for example: CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); Once created, the enum type can be …Declaration of Enumerated Types DeclarationsManual ChaptersPG1841.3. Declarations All variables used in a block must be declared in the declarations section of the block. (The only exceptions are that the loop variable of a FOR loop iterating over a ran…Declarations Declarative PartitioningManual ChaptersPG185.12.2. Declarative Partitioning PostgreSQL allows you to declare that a table is divided into partitions. The table that is divided is referred to as a partitioned table. The declaration in…Declarative Partitioning DECLAREManual ChaptersPG18DECLARE DECLARE — define a cursor Synopsis DECLARE cursor_name [ BINARY ] [ ASENSITIVE | INSENSITIVE ] [ [ NO ] SCROLL ] CURSOR [ { WITH | WITHOUT } HOLD ] FOR prepared_name DECLARE cursor_n…DECLARE
More results

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

pg17: choose a version ex: extensions only select open