pg_csv
Flexible CSV processing for Postgres
Repository
PostgREST/pg_csv
https://github.com/PostgREST/pg_csv
Source
pg_csv-1.0.2.tar.gz
pg_csv-1.0.2.tar.gz
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4760 | pg_csv | No | Yes | No | Yes | No | Yes | - |
| Related | 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.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.0.2 | 1817161514 | pg_csv | - |
| RPM | PIGSTY | 1.0.2 | 1817161514 | pg_csv_$v | - |
| DEB | PGDG | 1.0.2 | 1817161514 | postgresql-$v-pg-csv | - |
Build
You can build the RPM / DEB packages for pg_csv using pig build:
Install
You can install pg_csv directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
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 |
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)