PG_LO_CREAT(n)

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

πŸ’– PG_LO_CREAT() πŸ’–

ok so real talk, bestie β€” this page lives in the PostgreSQL Tcl Interface Documentation and it's giving "small but mighty." it's one function, one job, and honestly? it ate. let's get into it ✨


🌸 NAME 🌸

pg_lo_creat β€” create a large object 🫢

✨ SYNOPSIS ✨

pg_lo_creat conn mode

like, two args. that's it. that's the whole vibe. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

pg_lo_creat creates a large object. periodt. that's literally the entire description, no cap β€” she's concise, she's iconic, she doesn't over-explain herself. πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • conn β€” the handle of a connection to the database in which to create the large object. think of it as the group chat you're posting the large object into πŸ’¬
  • mode β€” the access mode for the large object. it can be any or'ing together of INV_READ and INV_WRITE. the "or" operator is |. for example:
[pg_lo_creat $conn "INV_READ|INV_WRITE"]

see how we smashed INV_READ and INV_WRITE together with that little |? that's the or'ing, bestie. that's the whole trick πŸ”₯

🌈 RETURN VALUE 🌈

the OID of the large object created. that's your receipt, your confirmation number, your little "it's done" text πŸ’Œ


ngl, this one's short and sweet β€” but don't sleep on it, because the INV_READ / INV_WRITE or'ing is doing real work and you will want to get the | right. no skipping. πŸ™ˆ

and that's the whole page, bestie!! this one's from the PostgreSQL Tcl Interface Documentation, dated 17 September 2020 β€” literally older than some of our fave memes and still slaying πŸ’œ go create some large objects, you main character 🧚⭐

πŸ“¦ where this page comes from