PG_EXEC_PREPARED(n)
π pg_exec_prepared π
okay bestie, welcome to the PostgreSQL Tcl Interface Documentation page for pg_exec_prepared β the prepared-statement girlie of the Tcl interface. she's here to send a request to execute a prepared SQL statement to the server, and she ate. periodt. β¨
β¨ NAME β¨
pg_exec_prepared β send a request to execute a prepared SQL statement to the server π«Ά
πΈ SYNOPSIS πΈ
pg_exec_prepared conn statementName [args]
π¦ DESCRIPTION π¦
okay so pg_exec_prepared submits a command to the PostgreSQL server and returns a result. she functions identically to pg_exec, except that she operates using statements prepared by the PREPARE SQL command. iconic behavior, no cap. π
quick caveat, bestie: note that prepared statements are only support under PostgreSQL 7.4 and later π«Ά
π ARGUMENTS π
connβ the handle of the connection on which to execute the command. πstatementNameβ the name of the prepared statement to execute. β¨argsβ consists of zero or more optional values that can be inserted, unquoted, into the SQL statement using$-style substitution. π
π RETURN VALUE π
the return value is a result handle. see pg_exec for details, iykyk π
π EXAMPLE π
here's the exact little demo, bestie β insert-people realness:
pg_exec $conn {prepare insert_people
(varchar, varchar, varchar, varchar, varchar, varchar)
as insert into people values ($1, $2, $3, $4, $5, $6);}
pg_exec_prepared $conn insert_people $email $name $address $city $state $zip
π«Ά that's the whole page, bestie β brought to you by the PostgreSQL Tcl Interface Documentation, dated 17 September 2020. now go execute something iconic π β¨
π¦ where this page comes from
- alpine 3.22: pgtcl-doc 3.1.0-r0 Β· BSD-3-Clause
- alpine 3.23: pgtcl-doc 3.1.1-r0 Β· BSD-3-Clause
- alpine 3.24: pgtcl-doc 3.1.1-r0 Β· BSD-3-Clause
- nixpkgs unstable: pgtcl 3.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms