Fun with Functions
summary
Covers concrete PostgreSQL function mechanics: exact create function syntax, argument modes (IN/OUT/INOUT/VARIADIC), polymorphic types and defaults, set-returning patterns (returns table / setof / record) and examples like using generate_series with aliases. Explains language choices (SQL, PL/pgSQL, PL/Python, PL/Perl, C/internal), PG_MODULE_MAGIC/version constraints, leakproof vs security definer behavior and optimizer/security consequences, preloadable shared libraries, cost/rows hints, and practical uses (triggers, custom operators, function-local config). Good if you want runnable patterns and pitfalls.
AI-written summary · about
chapters (26)
- 0:00Intro
- 1:16Functions in Postgres
- 5:53Sequel Functions
- 9:00Internal Functions
- 9:43C Language Functions
- 12:07Serverside Procedural Languages
- 17:23Dollar Quoting
- 17:46Anonymous Functions
- 19:57Changing Existing Functions
- 21:32Argument Syntax
- 24:26Argument Name
- 25:57Argument Type
- 29:48Default Expression
- 31:15Function Overloading
- 33:48Return Type
- 35:37Example
- 44:08Window Functions
- 44:51Volatility
- 46:28Behavior with Null
- 47:42Security Barrier View
- 48:50Leakproof
- 50:18Security Definer
- 51:43optimizer hints
- 52:23local configs
- 53:01function body
- 54:17use cases
related talks
30mLesser known features of PostgreSQL
49mSELECT 'amazing features' FROM "postgresql"
45mSELECT 'amazing_features' FROM "postgresql"
34mSimple and Awesome Database Tricks
46mUse PostgreSQL to Step Up Your Game
29mSELECT 'amazing_features' FROM "postgresql"
48mTricky SQL: Special Features of PostgreSQL's SQL Dialect
44mSELECT 'amazing_features' FROM "posgresql"
