{"repo":"PostgREST/pg_csv","free":true,"listed":false,"github":"https://github.com/PostgREST/pg_csv","clone":"git clone https://github.com/PostgREST/pg_csv.git","description":"Flexible CSV processing for Postgres","language":"C","stars":30,"topics":["csv","postgres","postgresql","postgresql-extension"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg csv Postgres has CSV support on the COPY command, but COPY has problems: - It uses a subprotocol, so it doesn't work with other standard features like prepared statements, pipeline mode or pgbench. - Is not composable. You can't use COPY inside CTEs, subqueries, view definitions or as function arguments. pg csv offers flexible CSV processing as a solution. - Includes CSV export/import functions that compose with SQL expressions. - Native C extension, x2 times faster than SQL queries that try to output CSV - No dependencies except Postgres. Installation PostgreSQL = 12 is supported. Clone this repo and run: To install the extension: CSV Export csv agg Aggregate that builds a CSV respecting RFC 4180, quoting as required. Custom Delimiter Custom delimiters can be used to produce different formats like pipe-separated values, tab-separated values or semicolon-separated values. [!NOTE] - Newline, carriage return and double quotes are not supported as delimiters to maintain the integrity of the separated values format. - The delimiter can only be a single char, if a longer string is specified only the first char will be used. - Why use a csv options constructor function instead of extra arguments? Aggregates don't support named arguments in postgres, see a discussion on https://github.com/PostgREST/pg csv/pull/2#issuecomment-3155740589. BOM You can include a byte-order mark (BOM) to make the CSV compatible with Excel. Header You can omit or include the CSV header. Null string NUL","default_branch":null,"files":null,"tree":[],"storefront":"/r/PostgREST","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PostgREST/pg_csv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}