Alzabo::SQLMaker::PostgreSQL(3) Alzabo SQL making class for PostgreSQL

SYNOPSIS


use Alzabo::SQLMaker;
my $sql = Alzabo::SQLMaker->new( sql => 'PostgreSQL' );

DESCRIPTION

PostgreSQL-specific SQL creation.

METHODS

Almost all of the functionality inherited from "Alzabo::SQLMaker" as is. The only overridden methods are "limit()" and "get_limit()", as PostgreSQL does allow for a "LIMIT" clause in its SQL.

EXPORTED SQL FUNCTIONS

SQL may be imported by name or by tags. They take arguments as documented in the PostgreSQL documentation (version 3.23.39). The functions (organized by tag) are:

:math

 PI
 RANDOM
 ABD
 CEIL
 DEGREES
 FLOOR
 FACTORIAL
 SQRT
 CBRT
 EXP
 LN
 RADIANS
 ACOS
 ASIN
 ATAN
 ATAN2
 COS
 COT
 SIN
 TAN
 ROUND
 TRUNC
 LOG
 POW
 MOD
 TO_CHAR

:string

 LENGTH
 CHAR_LENGTH
 CHARACTER_LENGTh
 OCTET_LENGTH
 TIRM
 UPPER
 LOWER
 INITCAP
 ASCII
 TO_ASCII
 STRPOS
 POSITION
 TO_NUMBER
 TO_DATE
 TO_TIMESTAMP
 REPEAT
 RPAD
 LPAD
 SUBSTR

:datetime

 NOW
 CURRENT_DATE
 CURRENT_TIME
 CURRENT_TIMESTAMP
 TIMEOFDAY
 ISFINIT
 TIMESTAMP
 TO_CHAR
 DATE_PART
 DATE_TRUNC
 EXTRACT
 OVERLAPS

:network

 BROADCAST
 HOST
 NETMASK
 MASKLEN
 NETWORK
 TEXT
 ABBREV

:aggregate

These are functions which operate on an aggregate set of values all at once.

 COUNT
 AVG
 MIN
 MAX
 SUM
 STDDEV
 VARIANCE

:system

These are functions which return information about the Postgres server.

 CURRENT_USER
 SYSTEM_USER
 USER

:control

These are flow control functions:

 NULLIF
 COALESCE

:misc

These are functions which don't fit into any other categories.

 ENCRYPT
 ENCODE
 DECODE
 FORMAT
 INET_NTOA
 INET_ATON
 BIT_OR
 BIT_AND
 PASSWORD
 MD5
 LOAD_FILE

:common

These are functions from other groups that are most commonly used.

 NOW
 COUNT
 AVG
 MIN
 MAX
 SUM
 DISTINCT

AUTHOR

Dave Rolsky, <[email protected]>