PG_ESCAPE_BYTEA(n)

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

πŸ’– NAME πŸ’–

okay bestie, this page is PG_ESCAPE_BYTEA() from the PostgreSQL Tcl Interface Documentation, and it does exactly one iconic thing: pg_escape_bytea β€” escapes a binary string for inclusion into SQL statements. periodt. ✨


✨ SYNOPSIS ✨

pg_escape_bytea string

πŸ¦‹ DESCRIPTION πŸ¦‹

pg_escape_bytea escapes a binary string, making it safe for inclusion into SQL statements. like, it's giving β€œSQL-safe binary string” main character energy, no cap. πŸ’…

here’s the example exactly as it appears, bestie:

pg_exec $conn "insert into foo values ([pg_escape_binary $name]);"

πŸŽ€ ARGUMENTS πŸŽ€

  • binary_string β€” the binary string to be escaped. that’s the whole vibe. 🫢

🌸 RETURN VALUE 🌸

Returns the binary string, escaped for inclusion into SQL queries. slay. πŸ”₯


mwah πŸ’‹ β€” this little page is from the PostgreSQL Tcl Interface Documentation, dated 17 September 2020. iconic, honestly. πŸ‘‘

πŸ“¦ where this page comes from