pgqr

pgqr : QR Code generator from PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4250
pgqr
pgqr
1.0
UTIL
BSD 3-Clause
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
See Also
pg_protobuf
base36
base62
gzip
bzip
zstd
http
pg_net

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
1.0
18
17
16
15
14
pgqr-
RPM
PIGSTY
1.0
18
17
16
15
14
pgqr_$v-
DEB
PIGSTY
1.0
18
17
16
15
14
postgresql-$v-pgqr-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el8.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el9.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el9.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el10.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el10.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d12.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d12.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d13.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d13.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u22.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u22.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u24.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u24.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0

Source

pig build pkg pgqr;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pgqr;		# install via package name, for the active PG version

pig install pgqr -v 18;   # install for PG 18
pig install pgqr -v 17;   # install for PG 17
pig install pgqr -v 16;   # install for PG 16
pig install pgqr -v 15;   # install for PG 15
pig install pgqr -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION pgqr;

Usage

pgqr: QR code generation for PostgreSQL

Function

pgqr(t text, correction_level integer, model_number integer, scale integer) RETURNS bytea

Parameters:

  • t – text to encode into the QR code
  • correction_level – error correction level: 0 to 3
  • model_number – QR model number: 0 to 2
  • scale – pixels per dot (scaling factor)

Example

Generate a QR code as a monochrome bitmap:

SELECT pgqr('QR Code with PostgreSQL', 0, 0, 4);

The output is a monochrome bitmap image (BMP format) returned as bytea, ready for display or storage.

Last updated on