pg_csv
Flexible CSV processing for Postgres
pg_csv : Flexible CSV processing for Postgres
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | file_fdw pg_bulkload omni_csv aws_s3 pg_parquet log_fdw pg_lake pg_sqlog pg_fact_loader pg_ducklake |
PIGSTY RPM and PGDG DEB package version 1.0.2 cover PostgreSQL 14-18; SQL/control version is 1.0.1 and the extension is not trusted.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 1.0.2 |
18 17 16 15 14 | pg_csv |
- |
| RPM | PIGSTY | 1.0.2 |
18 17 16 15 14 | pg_csv_$v |
- |
| DEB | PGDG | 1.0.2 |
18 17 16 15 14 | postgresql-$v-pg-csv |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| el8.aarch64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| el9.x86_64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| el9.aarch64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| el10.x86_64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| el10.aarch64 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 | PIGSTY 1.0.2 |
| d12.x86_64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| d12.aarch64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| d13.x86_64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| d13.aarch64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u22.x86_64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u22.aarch64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u24.x86_64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u24.aarch64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u26.x86_64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
| u26.aarch64 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 | PGDG 1.0.2 |
Source
github.com/PostgREST/pg_csv
pg_csv-1.0.2.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Provides a CSV aggregate that composes with SQL expressions, unlike COPY which requires a special protocol. RFC 4180 compliant with proper quoting.
Functions
| Function | Description |
|---|---|
csv_agg(record) |
Aggregate rows into CSV text with headers |
csv_agg(record, csv_options(...)) |
Aggregate with custom options |
csv_options(delimiter, bom, header, nullstr) |
Configure CSV output options |