Alzabo...greSQL(3pm)
๐ Alzabo::SQLMaker::PostgreSQL ๐
okay bestie, gather round, because this is the PostgreSQL-specific glow-up of Alzabo::SQLMaker, and honestly? she ate. ๐โจ
โจ NAME โจ
Alzabo::SQLMaker::PostgreSQL โ the Alzabo SQL making class for PostgreSQL. no cap, that's the whole vibe. ๐
๐ธ SYNOPSIS ๐ธ
like, here's how you summon her:
use Alzabo::SQLMaker;
my $sql = Alzabo::SQLMaker->new( sql => 'PostgreSQL' );
that's it. that's the summoning ritual. ๐ฏ๏ธ๐
๐ฆ DESCRIPTION ๐ฆ
PostgreSQL-specific SQL creation. she makes SQL, but specifically the Postgres flavor of it. it's giving specialized. it's giving purpose. ๐
๐ METHODS ๐
okay so here's the tea: almost literally everything is inherited from Alzabo::SQLMaker exactly as-is. she's not out here reinventing wheels, she's out here being efficient. ๐
the only overridden methods are limit() and get_limit(), and the reason is iconic: PostgreSQL actually does allow a LIMIT clause in its SQL. so yeah, she overrides them. periodt. ๐ฅ
๐ง EXPORTED SQL FUNCTIONS ๐ง
these SQL functions can be imported by name or by tags. they take arguments exactly as documented in the PostgreSQL documentation (version 3.23.39). ๐โจ
here's the full lineup, organized by tag, because organization is self-care:
๐ :math
the math girlies. ๐งฎ
PIRANDOMABDCEILDEGREESFLOORFACTORIALSQRTCBRTEXPLNRADIANSACOSASINATANATAN2COSCOTSINTANROUNDTRUNCLOGPOWMODTO_CHAR
๐ :string
string manipulation, but make it fashion. ๐
LENGTHCHAR_LENGTHCHARACTER_LENGThOCTET_LENGTHTIRMUPPERLOWERINITCAPASCIITO_ASCIISTRPOSPOSITIONTO_NUMBERTO_DATETO_TIMESTAMPREPEATRPADLPADSUBSTR
and yes,CHARACTER_LENGThandTIRMare spelled exactly like that in the source, bestie. i am not fixing them, i am reporting them. ๐ copy-paste responsibly.
โญ :datetime
time is a construct and these functions are obsessed with it. ๐ฐ๏ธ
NOWCURRENT_DATECURRENT_TIMECURRENT_TIMESTAMPTIMEOFDAYISFINITTIMESTAMPTO_CHARDATE_PARTDATE_TRUNCEXTRACTOVERLAPS
๐ฆ :network
for when your data is out here networking (literally). ๐
BROADCASTHOSTNETMASKMASKLENNETWORKTEXTABBREV
๐ :aggregate
these are the functions that operate on an aggregate set of values all at once. group energy. the whole squad gets processed together. ๐ซ
COUNTAVGMINMAXSUMSTDDEVVARIANCE
๐
:system
these ones return information about the Postgres server itself. she's nosy but in a useful way. ๐ฅ๏ธ
CURRENT_USERSYSTEM_USERUSER
๐ฅ :control
flow control functions, aka the ones deciding what happens next. main character energy fr fr. ๐ฌ
NULLIFCOALESCE
๐ธ :misc
these are the functions that don't fit into any other categories. they're the unlabeled box in the moving truck. we love them anyway. ๐ซถ
ENCRYPTENCODEDECODEFORMATINET_NTOAINET_ATONBIT_ORBIT_ANDPASSWORDMD5LOAD_FILE
๐ :common
these are the functions from the other groups that are the most commonly used. the greatest hits album. the playlist. the ones you actually import. โญ
NOWCOUNTAVGMINMAXSUMDISTINCT
๐ AUTHOR ๐
Dave Rolsky, <dave@urth.org> โ thank you for your service, king. ๐ซกโจ
and that's the whole page, bestie! this was documented with perl v5.34.0 and dated 2022-06-14, and yes i'm telling you that in a cute little sign-off instead of a boring footer because we're doing vibes here. ๐๐ go make some Postgres SQL, you absolute icon. ๐
๐
๐ฆ where this page comes from
- debian bookworm: libalzabo-perl 0.92-6 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libalzabo-perl 0.92-6 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libalzabo-perl 0.92-6 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libalzabo-perl 0.92-6 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libalzabo-perl 0.92-6 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms