Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/expected/sanity.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ FROM projects x;
CRLF""",8
(1 row)

-- proves that https://github.com/PostgREST/postgrest/issues/1371#issuecomment-519248984 is solved
select csv_agg(x) from nasty x;
csv_agg
------------------------
"unusual"",names",text+
1,test
(1 row)

6 changes: 6 additions & 0 deletions test/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ INSERT INTO projects VALUES (7, E'has \r CR', 8);
INSERT INTO projects VALUES (8, E'has \r\n CRLF"', 8);

create extension if not exists pg_csv;

CREATE TABLE nasty (
"unusual"",names" INTEGER GENERATED ALWAYS AS IDENTITY,
text TEXT
);
INSERT INTO nasty (text) VALUES ('test');
3 changes: 3 additions & 0 deletions test/sql/sanity.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
SELECT csv_agg(x) AS body
FROM projects x;

-- proves that https://github.com/PostgREST/postgrest/issues/1371#issuecomment-519248984 is solved
select csv_agg(x) from nasty x;
Loading