PG_LO_TRUNCATE(n)

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

✨ PG_LO_TRUNCATE() ✨

okay so this page is from the PostgreSQL Tcl Interface Documentation, and it's all about pg_lo_truncate, which is giving β€œresize my large object” energy. 🫢

🌸 NAME 🌸

pg_lo_truncate β€” truncate a large object to a given length. periodt. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

pg_lo_truncate conn descriptor length

πŸ’– DESCRIPTION πŸ’–

pg_lo_truncate truncates the specified large object to the given length. If the length is greater than the current large object length, the large object is extended with null bytes. no cap, that's the whole vibe. ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • conn β€” the handle of a connection to the database in which the large object exists. basically your entry ticket to the right database. πŸ”‘
  • descriptor β€” a descriptor for the large object from pg_lo_open. it's giving large-object ID card. πŸͺͺ
  • length β€” the length to which the large object is to be truncated or padded. yes, it can go shorter or get padded. πŸ“

πŸ’… RETURN VALUE πŸ’…

A zero-based offset in bytes suitable for input to pg_lo_lseek. so like, it hands you a byte offset you can feed straight into pg_lo_lseek. slay. πŸ’«

not me emphasizing the important bit: zero-based offset, in bytes, suitable for input to pg_lo_lseek. iykyk. 🧚
🫢 that's the PostgreSQL Tcl Interface Documentation tea, dated 17 September 2020 β€” periodt. πŸ’…
πŸ“¦ where this page comes from