Skip to content

Change delimiter for CSV response #1973

Answered by laurenceisla
laurenceisla asked this question in Q&A
Discussion options

You must be logged in to vote

Answered given on Gitter https://gitter.im/begriffs/postgrest?at=615b348e3f09d85736f4c04d:

There's no way to change the delimiter yet as mentioned in this issue: #1102. You could however get a similar behavior using a function with parameters working as your date filters, albeit in a more cumbersome way. A possible query for the function could be:

SELECT 'id|column1|column2|...'
UNION ALL
SELECT id + '|' + column1 + '|' + column2 + '|' + ... 
FROM api.goods 
WHERE updatetime > @updatetime

and use Accept: text/plain to get a plain text output.

Replies: 1 comment

Comment options

laurenceisla
Oct 4, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by laurenceisla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant