omni_csv
omni_csv
omni_csv : CSV toolkit
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2946 | omni_csv
|
omni_csv
|
0.1.1 |
FEAT
|
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 | omni_csv |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.1.1 |
18
17
16
15
14
|
omni_csv |
- |
| RPM | PIGSTY
|
0.1.1 |
18
17
16
15
14
|
omnigres_$v |
- |
| DEB | PIGSTY
|
0.1.1 |
18
17
16
15
14
|
postgresql-$v-omnigres |
- |
| 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
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el9.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el10.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el10.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
d12.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
d12.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
d13.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
d13.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
u22.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
u22.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
u24.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
u24.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
Source
pig build pkg omni_csv; # 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 omni_csv; # install via package name, for the active PG version
pig install omni_csv -v 18; # install for PG 18
pig install omni_csv -v 17; # install for PG 17
pig install omni_csv -v 16; # install for PG 16
pig install omni_csv -v 15; # install for PG 15
pig install omni_csv -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION omni_csv;Usage
The omni_csv extension provides CSV parsing, inspection, and generation functions.
Inspect CSV Structure
SELECT * FROM omni_csv.csv_info(E'name,age,city\nJohn,25,NYC\nJane,30,LA');
-- Returns: name, age, city (one row per column)Parse CSV into Records
SELECT * FROM omni_csv.parse(E'name,age,city\nJohn,25,NYC\nJane,30,LA')
AS t(name text, age text, city text);Column structure must be specified using the AS t(...) clause and should match the CSV structure.
Generate CSV from Query Results
SELECT omni_csv.csv_agg(t)
FROM (SELECT name, age, city FROM employees ORDER BY name) t;Returns CSV text with headers and properly escaped values. Returns empty string on empty result sets.
Limitations
- Large CSV strings are processed entirely in memory (no streaming)
- Column types must be declared in the
AS t(...)clause - Consider materializing parsed data for repeated access
Last updated on