hello_world
A simple hello-world Postgres extension using sql/plpgsql implementing a russian roulette function.
hello_world · A simple hello-world Postgres extension using sql/plpgsql implementing a russian roulette function.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101397 | hello_world | hello_world | 1.0 | FUNC | Unknown | SQL |
Usage
Sources:
- Official upstream README
- Official extension control file (hello_world.control)
- Official extension SQL (hello_world–1.0.sql)
hello_world — A simple PostgreSQL extension that demonstrates basic extension functionality using SQL only (no C code compilation required). Use it when SQL needs these specialized functions or aggregates. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
hello_world()is an extension function and returnsTEXT.hello_world(name TEXT)is an extension function and returnsTEXT.log_hello_world(message TEXT DEFAULT 'Hello, World!')is an extension function and returnsINTEGER.russian_roulette(target_user_id INTEGER, odds INTEGER DEFAULT 6)is an extension function and returnsTEXT.hello_world_logis a table installed or managed by the extension.
Requirements and Caveats
- The reviewed control file declares default version
1.0. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.