url_encode

url_encode

url_encode : url_encode, url_decode functions

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4190
url_encode
url_encode
1.2.5
UTIL
PostgreSQL
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
See Also
pg_html5_email_address
base36
base62
gzip
bzip
zstd
http
pg_net

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
1.2.5
18
17
16
15
14
url_encode-
RPM
PIGSTY
1.2.5
18
17
16
15
14
url_encode_$v-
DEB
PIGSTY
1.2.5
18
17
16
15
14
postgresql-$v-url-encode-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
el8.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
el9.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
el9.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
el10.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
el10.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
d12.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
d12.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
d13.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
d13.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
u22.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
u22.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
u24.x86_64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
u24.aarch64
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PIGSTY 1.2.5
PackageVersionOSORGSIZEFile URL
url_encode_181.2.5el8.x86_64pigsty13.3 KiBurl_encode_18-1.2.5-1PIGSTY.el8.x86_64.rpm
url_encode_181.2.5el8.aarch64pigsty13.4 KiBurl_encode_18-1.2.5-1PIGSTY.el8.aarch64.rpm
url_encode_181.2.5el9.x86_64pigsty13.2 KiBurl_encode_18-1.2.5-1PIGSTY.el9.x86_64.rpm
url_encode_181.2.5el9.aarch64pigsty13.2 KiBurl_encode_18-1.2.5-1PIGSTY.el9.aarch64.rpm
url_encode_181.2.5el10.x86_64pigsty13.2 KiBurl_encode_18-1.2.5-1PIGSTY.el10.x86_64.rpm
url_encode_181.2.5el10.aarch64pigsty13.5 KiBurl_encode_18-1.2.5-1PIGSTY.el10.aarch64.rpm
postgresql-18-url-encode1.2.5d12.x86_64pigsty12.8 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~bookworm_amd64.deb
postgresql-18-url-encode1.2.5d12.aarch64pigsty12.8 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~bookworm_arm64.deb
postgresql-18-url-encode1.2.5d13.x86_64pigsty12.8 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~trixie_amd64.deb
postgresql-18-url-encode1.2.5d13.aarch64pigsty13.0 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~trixie_arm64.deb
postgresql-18-url-encode1.2.5u22.x86_64pigsty13.0 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~jammy_amd64.deb
postgresql-18-url-encode1.2.5u22.aarch64pigsty12.8 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~jammy_arm64.deb
postgresql-18-url-encode1.2.5u24.x86_64pigsty13.2 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~noble_amd64.deb
postgresql-18-url-encode1.2.5u24.aarch64pigsty13.2 KiBpostgresql-18-url-encode_1.2.5-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
url_encode_171.2.5el8.x86_64pigsty13.3 KiBurl_encode_17-1.2.5-1PIGSTY.el8.x86_64.rpm
url_encode_171.2.5el8.aarch64pigsty13.4 KiBurl_encode_17-1.2.5-1PIGSTY.el8.aarch64.rpm
url_encode_171.2.5el9.x86_64pigsty13.2 KiBurl_encode_17-1.2.5-1PIGSTY.el9.x86_64.rpm
url_encode_171.2.5el9.aarch64pigsty13.2 KiBurl_encode_17-1.2.5-1PIGSTY.el9.aarch64.rpm
url_encode_171.2.5el10.x86_64pigsty13.2 KiBurl_encode_17-1.2.5-1PIGSTY.el10.x86_64.rpm
url_encode_171.2.5el10.aarch64pigsty13.5 KiBurl_encode_17-1.2.5-1PIGSTY.el10.aarch64.rpm
postgresql-17-url-encode1.2.5d12.x86_64pigsty12.7 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~bookworm_amd64.deb
postgresql-17-url-encode1.2.5d12.aarch64pigsty12.8 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~bookworm_arm64.deb
postgresql-17-url-encode1.2.5d13.x86_64pigsty12.7 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~trixie_amd64.deb
postgresql-17-url-encode1.2.5d13.aarch64pigsty13.0 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~trixie_arm64.deb
postgresql-17-url-encode1.2.5u22.x86_64pigsty13.1 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~jammy_amd64.deb
postgresql-17-url-encode1.2.5u22.aarch64pigsty12.9 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~jammy_arm64.deb
postgresql-17-url-encode1.2.5u24.x86_64pigsty13.2 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~noble_amd64.deb
postgresql-17-url-encode1.2.5u24.aarch64pigsty13.2 KiBpostgresql-17-url-encode_1.2.5-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
url_encode_161.2.5el8.x86_64pigsty13.2 KiBurl_encode_16-1.2.5-1PIGSTY.el8.x86_64.rpm
url_encode_161.2.5el8.aarch64pigsty13.4 KiBurl_encode_16-1.2.5-1PIGSTY.el8.aarch64.rpm
url_encode_161.2.5el9.x86_64pigsty13.0 KiBurl_encode_16-1.2.5-1PIGSTY.el9.x86_64.rpm
url_encode_161.2.5el9.aarch64pigsty13.1 KiBurl_encode_16-1.2.5-1PIGSTY.el9.aarch64.rpm
url_encode_161.2.5el10.x86_64pigsty13.1 KiBurl_encode_16-1.2.5-1PIGSTY.el10.x86_64.rpm
url_encode_161.2.5el10.aarch64pigsty13.4 KiBurl_encode_16-1.2.5-1PIGSTY.el10.aarch64.rpm
postgresql-16-url-encode1.2.5d12.x86_64pigsty12.4 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~bookworm_amd64.deb
postgresql-16-url-encode1.2.5d12.aarch64pigsty12.5 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~bookworm_arm64.deb
postgresql-16-url-encode1.2.5d13.x86_64pigsty12.4 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~trixie_amd64.deb
postgresql-16-url-encode1.2.5d13.aarch64pigsty12.7 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~trixie_arm64.deb
postgresql-16-url-encode1.2.5u22.x86_64pigsty12.9 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~jammy_amd64.deb
postgresql-16-url-encode1.2.5u22.aarch64pigsty12.7 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~jammy_arm64.deb
postgresql-16-url-encode1.2.5u24.x86_64pigsty12.8 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~noble_amd64.deb
postgresql-16-url-encode1.2.5u24.aarch64pigsty12.9 KiBpostgresql-16-url-encode_1.2.5-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
url_encode_151.2.5el8.x86_64pigsty13.2 KiBurl_encode_15-1.2.5-1PIGSTY.el8.x86_64.rpm
url_encode_151.2.5el8.aarch64pigsty13.4 KiBurl_encode_15-1.2.5-1PIGSTY.el8.aarch64.rpm
url_encode_151.2.5el9.x86_64pigsty13.0 KiBurl_encode_15-1.2.5-1PIGSTY.el9.x86_64.rpm
url_encode_151.2.5el9.aarch64pigsty13.1 KiBurl_encode_15-1.2.5-1PIGSTY.el9.aarch64.rpm
url_encode_151.2.5el10.x86_64pigsty13.1 KiBurl_encode_15-1.2.5-1PIGSTY.el10.x86_64.rpm
url_encode_151.2.5el10.aarch64pigsty13.4 KiBurl_encode_15-1.2.5-1PIGSTY.el10.aarch64.rpm
postgresql-15-url-encode1.2.5d12.x86_64pigsty12.5 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~bookworm_amd64.deb
postgresql-15-url-encode1.2.5d12.aarch64pigsty12.5 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~bookworm_arm64.deb
postgresql-15-url-encode1.2.5d13.x86_64pigsty12.4 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~trixie_amd64.deb
postgresql-15-url-encode1.2.5d13.aarch64pigsty12.7 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~trixie_arm64.deb
postgresql-15-url-encode1.2.5u22.x86_64pigsty12.9 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~jammy_amd64.deb
postgresql-15-url-encode1.2.5u22.aarch64pigsty12.7 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~jammy_arm64.deb
postgresql-15-url-encode1.2.5u24.x86_64pigsty12.9 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~noble_amd64.deb
postgresql-15-url-encode1.2.5u24.aarch64pigsty12.9 KiBpostgresql-15-url-encode_1.2.5-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
url_encode_141.2.5el8.x86_64pigsty13.2 KiBurl_encode_14-1.2.5-1PIGSTY.el8.x86_64.rpm
url_encode_141.2.5el8.aarch64pigsty13.4 KiBurl_encode_14-1.2.5-1PIGSTY.el8.aarch64.rpm
url_encode_141.2.5el9.x86_64pigsty13.0 KiBurl_encode_14-1.2.5-1PIGSTY.el9.x86_64.rpm
url_encode_141.2.5el9.aarch64pigsty13.1 KiBurl_encode_14-1.2.5-1PIGSTY.el9.aarch64.rpm
url_encode_141.2.5el10.x86_64pigsty13.1 KiBurl_encode_14-1.2.5-1PIGSTY.el10.x86_64.rpm
url_encode_141.2.5el10.aarch64pigsty13.4 KiBurl_encode_14-1.2.5-1PIGSTY.el10.aarch64.rpm
postgresql-14-url-encode1.2.5d12.x86_64pigsty12.4 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~bookworm_amd64.deb
postgresql-14-url-encode1.2.5d12.aarch64pigsty12.5 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~bookworm_arm64.deb
postgresql-14-url-encode1.2.5d13.x86_64pigsty12.4 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~trixie_amd64.deb
postgresql-14-url-encode1.2.5d13.aarch64pigsty12.7 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~trixie_arm64.deb
postgresql-14-url-encode1.2.5u22.x86_64pigsty12.9 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~jammy_amd64.deb
postgresql-14-url-encode1.2.5u22.aarch64pigsty12.7 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~jammy_arm64.deb
postgresql-14-url-encode1.2.5u24.x86_64pigsty12.9 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~noble_amd64.deb
postgresql-14-url-encode1.2.5u24.aarch64pigsty12.8 KiBpostgresql-14-url-encode_1.2.5-1PIGSTY~noble_arm64.deb

Source

pig build pkg url_encode;		# 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 url_encode;		# install via package name, for the active PG version

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

Create this extension with:

CREATE EXTENSION url_encode;

Usage

url_encode: URL encoding and decoding functions for PostgreSQL

Functions

url_encode(text) returns text

Percent-encode a string for use in URLs:

SELECT url_encode('Hello World');
-- Hello%20World

SELECT url_encode('Ahoj Svetе');
-- Ahoj%20Sv%C4%9Bte

url_decode(text) returns text

Decode a percent-encoded string:

SELECT url_decode('Hello%20World');
-- Hello World

SELECT url_decode('Ahoj%20Sv%C4%9Bte');
-- Ahoj Svetе

uri_encode(text) returns text

Encode a full URI (preserves scheme, slashes, etc.):

SELECT uri_encode('http://hu.wikipedia.org/wiki/Sao_Paulo');
-- http://hu.wikipedia.org/wiki/S%C3%A3o_Paulo

uri_decode(text) returns text

Decode an encoded URI:

SELECT uri_decode('http://hu.wikipedia.org/wiki/S%C3%A3o_Paulo');
-- http://hu.wikipedia.org/wiki/Sao_Paulo
Last updated on