Apache...ostgres(3pm)

πŸ’… Apache::Session::Postgres β€” the manual page, bestie edition

okay so this is Apache...ostgres(3pm) β€” a User Contributed Perl Documentation page, no cap. It's in section 3pm of the manual, and it's here to tell you all about Apache::Session::Postgres. Let's go. πŸ¦‹


✨ NAME ✨

Apache::Session::Postgres β€” an implementation of Apache::Session. That's the whole name, that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

bestie, here's how you actually use it. Two whole vibes, pick your fighter:

use Apache::Session::Postgres;

#if you want Apache::Session to open new DB handles:

tie %hash, 'Apache::Session::Postgres', $id, {
   DataSource => 'dbi:Pg:dbname=sessions',
   UserName   => $db_user,
   Password   => $db_pass,
   Commit     => 1
};

#or, if your handles are already opened:

tie %hash, 'Apache::Session::Postgres', $id, {
   Handle => $dbh,
   Commit => 1
};

like, option one: let Apache::Session open brand new DB handles for you. option two: you already got your handles open, so you just pass the Handle and we move on. iconic either way. πŸ’–


🫢 DESCRIPTION 🫢

This module is an implementation of Apache::Session. It uses the Postgres backing store and no locking. That's the tea. β˜•

If you want the full picture, go look at the example, and check the documentation for Apache::Session::Store::Postgres for more details. iykyk. πŸ’…


πŸ‘‘ USAGE πŸ‘‘

The special Apache::Session argument for this module is Commit. and bestie, you MUST provide it β€” like, mandatory mandatory, not optional-coded.

Commit tells this module to either:

  • commit the transaction when it's finished, or
  • simply do nothing.

That's it. Those are the options.

why is it a whole required thing tho? because this feature exists so this module won't have adverse interactions with your local transaction policy, nor your local database handle caching policy. and yeah β€” the argument is mandatory in order to make you think about this problem. not me being forced into character development by a config flag 😭

fr fr: no Commit, no session. the module is making you have a thought. consider yourself thought-having. 🧠✨

πŸ’œ AUTHOR πŸ’œ

This module was written by Jeffrey William Baker <jwbaker@acm.org>. legend behavior, honestly. πŸ‘‘


🌈 SEE ALSO 🌈

go read these too, they're the friend group:

  • Apache::Session::File
  • Apache::Session::Flex
  • Apache::Session::DB_File
  • Apache::Session::Postgres
  • Apache::Session

and that's the whole page, periodt. πŸŽ€ this was perl v5.36.0, dated 2022-11-19, and it's the Apache...ostgres(3pm) page from the User Contributed Perl Documentation. mwah, go tie some hashes. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from