pgpm-faker
SQL functions and dictionaries for generating synthetic test data.
pgpm-faker · SQL functions and dictionaries for generating synthetic test data.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101677 | pgpm-faker | pgpm-faker | 0.15.5 | FUNC | MIT | PLpgSQL |
| Relationships | |
|---|---|
| Requires | citext pgcrypto pgpm-types pgpm-verify plpgsql |
Usage
Sources:
- Official upstream README
- Official extension control file (pgpm-faker.control)
- Official extension SQL (pgpm-faker–0.15.5.sql)
pgpm-faker — @pgpm/faker provides a comprehensive set of fake data generation functions directly in PostgreSQL. Perfect for seeding test databases, creating demo data, and development environments. All functions are implemented in pure plpgsql and return realistic-looking data without external dependencies. Use it when SQL needs these specialized functions or aggregates. Upstream describes this capability as experimental.
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
faker.address(state text DEFAULT NULL, city text DEFAULT NULL)is an extension function and returnstext.faker.attachment(mime text DEFAULT NULL)is an extension function and returnsattachment.faker.birthdate(min int DEFAULT 1, max int DEFAULT 100)is an extension function and returnsdate.faker.boolean()is an extension function and returnsboolean.faker.business()is an extension function and returnstext.faker.city(state text DEFAULT NULL)is an extension function and returnstext.faker.date(min int DEFAULT 1, max int DEFAULT 100, future boolean DEFAULT false)is an extension function and returnsdate.faker.email()is an extension function and returnstext.faker.ext(mime text DEFAULT faker.mime())is an extension function and returnstext.faker.file(mime text DEFAULT NULL)is an extension function and returnstext.faker.float(min double precision DEFAULT 0, max double precision DEFAULT 100)is an extension function and returnsdouble.faker.fullname(gender text DEFAULT NULL)is an extension function and returnstext.faker.gender(gender text DEFAULT NULL)is an extension function and returnstext.faker.hostname()is an extension function and returnstext.
Requirements and Caveats
- The reviewed control file declares default version
0.15.5. - Install the confirmed extension dependencies first:
citext,pgcrypto,plpgsql,pgpm-types,pgpm-verify. - The control file marks the extension as non-relocatable.
- The control file does not require superuser-only installation.
- Upstream labels part or all of the project experimental.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.