\bind
Sets query parameters for the next query execution, with the specified parameters passed for any parameter placeholders ( $1 etc.).
Reading PG 18·Select a recorded version
- Client
- psql 18.7
- Case-sensitive spelling
- \bind
- command
- \bind
- manual path
- app-psql.html#APP-PSQL-META-COMMAND-BIND
- modifiers
- Unknown
- signature
- \bind [ parameter ] ...
- spellings
- \bind
Definition PG 18
\bind[parameter] ...Sets query parameters for the next query execution, with the specified parameters passed for any parameter placeholders (
$1etc.).Example:
INSERT INTO tbl1 VALUES ($1, $2) \bind 'first value' 'second value' \g
This also works for query-execution commands besides
\g, such as\gxand\gset.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. (The extended query protocol is used even if the query has no parameters and this command specifies zero parameters.) This command affects only the next query executed; all subsequent queries will use the simple query protocol by default.
Exact case-sensitive spellings
\bind
Spellings in this manual definition
| Command | Documented suffix modifiers |
|---|---|
| \bind | None listed in this signature |
Compare versions
Complete source facts
documentation revision
{"inputs":[{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","version":"18.7"},{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"cb475c53a16d9e06358f5e6c9c5649645db92568cfd319f230c62c9f57ae090b","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · 1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915
Text language: en · 1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915