DBIx::...dle::Pg(3pm)

๐Ÿ’– DBIx::SearchBuilder::Handle::Pg โ€” the manual, but make it a group chat ๐Ÿ’–

okay bestie so you're looking at DBIx::SearchBuilder::Handle::Pg(3pm) โ€” that's the manual name, that's the whole thing, we're not doing the boring header line, we're just saying it once and moving on. it's the Postgres-specific handle object, and she's iconic. ๐ŸŒธ


โœจ NAME โœจ

DBIx::SearchBuilder::Handle::Pg โ€” a Postgres specific Handle object. that's her. that's the whole name. short, sweet, slays. ๐Ÿ‘‘


โœจ SYNOPSIS โœจ

bestie. there is literally nothing here. the synopsis is empty. a whole section, empty. she said "no thoughts, head empty." ๐Ÿ’€ so likeโ€ฆ go read METHODS, that's where the lore is.


โœจ DESCRIPTION โœจ

so this module gives you a subclass of DBIx::SearchBuilder::Handle โ€” and the entire reason she exists? she compensates for some of the idiosyncrasies of Postgres. that's it. that's the pitch. Postgres has quirks, she handles them, periodt. ๐Ÿ˜โœจ


โœจ METHODS โœจ

๐Ÿฆ‹ Connect

Connect takes a hashref and passes it off to SUPER::Connect; it Forces the timezone to GMT, and it returns a database handle. so you hand her a hashref, she hands you back a db handle. GMT timezone, no negotiations. ๐Ÿซถ


๐Ÿฆ‹ BuildDSN

this one Extends BuildDNS in DBIx::SearchBuilder::Handle โ€” and yes, we're quoting that exactly the way the source writes it, no notes ๐Ÿ’… โ€” and the whole point is to force client_encoding to be UTF-8, so that character strings can be safely passed to, and retrieved from, the database. look at "Encoding" in DBD::Pg if you want the deep lore. UTF-8 or nothing fr fr. ๐ŸŒˆ


๐Ÿฆ‹ Insert

takes a table name as the first argument and assumes that the rest of the arguments are an array of key-value pairs to be inserted. so: table first, then the vibes (key-value pairs) after. easy.

In case of insert failure, it returns a Class::ReturnValue object preloaded with error info. so when it goes wrong, you don't get some cryptic nothing โ€” you get a whole object with the receipts. ๐Ÿ˜ญ๐Ÿ’–


๐Ÿฆ‹ InsertQueryString

a Postgres sepcific overriding method for "InsertQueryString" in DBIx::SearchBuilder::Handle. (yes, "sepcific" โ€” quoted exactly, she's built different ๐Ÿ™ˆ) it overrides the parent, that's the whole deal.


๐Ÿฆ‹ IdSequenceName TABLE

Takes a TABLE name and returns the name of the sequence of the primary key for that table. give her a table, she tells you what the primary key's sequence is called. queen behavior. ๐Ÿ‘‘โœจ


๐Ÿฆ‹ BinarySafeBLOBs

Return undef, as no current version of postgres supports binary-safe blobs.

literally returns undef. that's the whole method. no current version of postgres supports binary-safe blobs, so bestie just says "no" and returns undef. ๐Ÿ’€ respect honestly.

๐Ÿฆ‹ ApplyLimits STATEMENTREF ROWS_PER_PAGE FIRST_ROW

takes an SQL SELECT statement and massages it to return ROWS_PER_PAGE starting with FIRST_ROW. she takes your statement, gives it a little massage, and now it's paginated. spa day for SQL. ๐Ÿงšโœจ


๐Ÿฆ‹ _MakeClauseCaseInsensitive FIELD OPERATOR VALUE

Takes a field, operator and value. performs the magic necessary to make your database treat this clause as case insensitive.

Returns a FIELD OPERATOR VALUE triple. that's it โ€” three things in, three things out, and in between the magic happens. ๐Ÿ”ฎ


๐Ÿฆ‹ DistinctQuery STATEMENTREF

takes an incomplete SQL SELECT statement and massages it to return a DISTINCT result set. incomplete statement goes in, DISTINCT comes out. no duplicates allowed in this household. ๐Ÿšซ๐Ÿ‘ฏ


๐Ÿฆ‹ SimpleDateTimeFunctions

Returns hash reference with specific date time functions of this database for "DateTimeFunction" in DBIx::SearchBuilder::Handle.


๐Ÿฆ‹ ConvertTimezoneFunction

Custom implementation of "ConvertTimezoneFunction" in DBIx::SearchBuilder::Handle.

In Pg, time and timestamp data types may be "with time zone" or "without time zone". So if the Field argument is a timestamp "with time zone", then the From argument is not required and is useless. Otherwise, the From argument identifies the time zone of the Field argument that is "without time zone".

For consistency with other DBs, use timestamp columns without time zones and provide the From argument.

so like. real talk. "with time zone" means From is doing nothing for you โ€” she's not required and she's useless, straight up. "without time zone" means From tells you what time zone that Field is in. and if you want your life to match how every other DB behaves? no-time-zone columns + give her the From. that's the move. ๐Ÿ•๐Ÿ’–

and that's the whole page bestie, we ate and left absolutely zero crumbs ๐ŸŽ€

okay so this was DBIx::SearchBuilder::Handle::Pg โ€” perl v5.40.1 build, dated 2026-05-07, straight from the User Contributed Perl Documentation pile. go forth and be case insensitive at exactly the right moments. iykyk. ๐Ÿ’œโœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from