PG Bug reporting form <noreply@postgresql.org> writes:
> Text File
> -----------
> Id,Body
> 1,"{}
> \.
> "
It is expected and documented that v17 (and older) psql will treat
the \. line as an end-of-data marker, CSV mode or not.
We did improve that in v18, but it was judged too much of a behavior
change to back-patch.
regards, tom lane