Skip to content

noqcks/haikunator-plpgsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haikunator-plpgsql

ci License: MIT

Generate Heroku-like random names in PL/pgSQL. Inspired by usmanbashir/haikunator

Usage

You can find the function at function/001_haikunator.sql.

haikunate(token_length integer default 4, delimiter TEXT default '-', token_hex BOOLEAN default FALSE)

Examples

SELECT haikunate(); -- => "aged-band-1234"
SELECT haikunate(4, "-", false); -- => "blue-breeze-1234"
SELECT haikunate(4, "-", true); -- => "aged-band-4ab7"
SELECT haikunate(4, "_", true); -- => "autumn_bird_4ab7"

About

Generate Heroku-like random names in PL/pgSQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published