PG_EXEC_PREPARED(n)

πŸ“¦ version 3.1.1, in alpine 3.22, alpine 3.23, alpine 3.24, nixpkgs unstable

πŸ’… 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