pg_map
pg_lake : Map type for PostgreSQL, bundled as a required pg_lake component.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2563 | pg_map
|
pg_lake
|
3.4 |
OLAP
|
Apache-2.0
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d--
|
No
|
Yes
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Schemas | map_type pg_catalog |
| Need By | pg_lake_engine
|
| Siblings | pg_lake
pg_extension_base
pg_extension_updater
pg_lake_engine
pg_lake_iceberg
pg_lake_table
pg_lake_copy
|
This packaged provider is Snowflake pg_lake pg_map 3.4, not the unrelated semenikhind/pg_map 1.0 array-mapping extension. The catalog name is unique, so the packaged provider supersedes that source-only row and is reassigned with the pg_lake family to OLAP ID 2563.
Extension SQL/control version is 3.4; source and DEB/RPM package version is 3.4.0.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
3.4 |
18
17
16
15
14
|
pg_lake |
- |
| RPM | PIGSTY
|
3.4.0 |
18
17
16
15
14
|
pg_lake_$v |
- |
| DEB | PIGSTY
|
3.4.0 |
18
17
16
15
14
|
postgresql-$v-pg-lake |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el8.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el9.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
el9.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
el10.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
el10.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
d12.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
d12.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
d13.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
d13.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u22.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u22.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u24.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u24.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u26.x86_64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
u26.aarch64
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
PIGSTY 3.4.0
|
MISS
|
MISS
|
Source
pig build pkg pg_lake; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_lake; # install via package name, for the active PG version
pig install pg_map; # install by extension name, for the current active PG version
pig install pg_map -v 18; # install for PG 18
pig install pg_map -v 17; # install for PG 17
pig install pg_map -v 16; # install for PG 16Create this extension with:
CREATE EXTENSION pg_map;Usage
Sources:
- pg_map README at the reviewed commit
- pg_map install SQL at the reviewed commit
- pg_map C implementation at the reviewed commit
pg_map applies a one-argument PostgreSQL function to every element of an array and returns an array of the function results. Its two overloads identify the mapped function by OID or by text; a text signature containing parentheses is resolved as a specific regprocedure, while a bare name is resolved as regproc.
Map a Function over an Array
CREATE EXTENSION pg_map;
SELECT pg_map(
'upper(text)',
ARRAY['alpha', 'beta', 'gamma']::text[]
);The example applies upper(text) to each element and returns an uppercase text array. Supplying a full signature avoids ambiguity when a function name is overloaded.
Caveats
- Upstream only claims compatibility with PostgreSQL 9.6devel. It does not document support for modern PostgreSQL releases.
- The version 1.0 C implementation uses PostgreSQL internal array, catalog, and function-manager APIs. Build and regression-test it against the exact server source before use.
- The mapped function must accept one argument. The implementation attempts an element-type cast when the array element type differs from the function argument type and errors if no cast function is available.
- Upstream publishes no license or release compatibility matrix.