↑↓ select ↵ open ⌫ change scope Open full search

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

Wiki / psql Commands / Query execution

\bind_named

\bind_named is equivalent to \bind , except that it takes the name of an existing prepared statement as first parameter. An empty string denotes the unnamed prepared statement.

Reading PostgreSQL 18.6.

Description

\bind_named is equivalent to \bind , except that it takes the name of an existing prepared statement as first parameter. An empty string denotes the unnamed prepared statement.

Client
psql 18.6
Case-sensitive spelling
\bind_named

Usage

\bind_named statement_name [ parameter ] ...

Spellings in this manual definition

CommandDocumented suffix modifiers
\bind_namedNone listed in this signature

Manual definition

\bind_named statement_name [ parameter ] ...

\bind_named is equivalent to \bind, except that it takes the name of an existing prepared statement as first parameter. An empty string denotes the unnamed prepared statement.

Example:

INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1
\bind_named stmt1 'first value' 'second value' \g

This command causes the extended query protocol (see Section 54.1.2) to be used, unlike normal psql operation, which uses the simple query protocol. So this command can be useful to test the extended query protocol from psql.

Related entries

Documentation and source

Source build
Version
18.6
Build
https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
Source fingerprint
ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8

Compare versions

PostgreSQL 17 → 18: added.

--- PostgreSQL 17
+++ PostgreSQL 18
@@ -1 +1,8 @@
-Not recorded in this version
+{
+  "definition": "\\bind_named is equivalent to \\bind , except that it takes the name of an existing prepared statement as first parameter. An empty string denotes the unnamed prepared statement. Example: INSERT INTO tbls1 VALUES ($1, $2) \\parse stmt1 \\bind_named stmt1 'first value' 'second value' \\g This command causes the extended query protocol (see Section 54.1.2 ) to be used, unlike normal psql operation, which uses the simple query protocol. So this command can be useful to test the extended query protocol from psql .",
+  "modifiers": [],
+  "signature": "\\bind_named statement_name [ parameter ] ...",
+  "spellings": [
+    "\\bind_named"
+  ]
+}

Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.

Related entries

Export JSON · Back to psql Commands · Recorded in PostgreSQL 18 through 20; the first sample is not necessarily its introduction.