uri
URI Data type for PostgreSQL
pg_uri : URI Data type for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3790 | uri | pg_uri | 1.20251029 |
TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | emailaddr pg_html5_email_address url_encode ip4r prefix asn1oid pg_smtp_client pg_utl_smtp omni_email isn |
+int flag
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.20251029 |
18 17 16 15 14 | pg_uri |
- |
| RPM | PIGSTY | 1.20251029 |
18 17 16 15 14 | pguri_$v |
- |
| DEB | PIGSTY | 1.20251029 |
18 17 16 15 14 | postgresql-$v-pg-uri |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| el8.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| el9.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| el9.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| el10.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| el10.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| d12.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| d12.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| d13.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| d13.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u22.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u22.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u24.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u24.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u26.x86_64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
| u26.aarch64 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 | PIGSTY 1.20251029 |
Source
github.com/petere/pguri
pguri-1.20251029.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
The uri extension provides a data type for storing URIs with syntax validation per RFC 3986, component extraction functions, and human-friendly sorting.
Component Extraction Functions
| Function | Returns | Description |
|---|---|---|
uri_scheme(uri) |
text |
Scheme (http, ftp, mailto) |
uri_userinfo(uri) |
text |
User info; NULL if absent |
uri_host(uri) |
text |
Hostname or IP address |
uri_host_inet(uri) |
inet |
IP host as inet; NULL if not IP |
uri_port(uri) |
integer |
Port number; NULL if unspecified |
uri_path(uri) |
text |
Path component (never NULL) |
uri_path_array(uri) |
text[] |
Path split by / |
uri_query(uri) |
text |
Query string; NULL if absent |
uri_fragment(uri) |
text |
Fragment; NULL if absent |