is psql treatment of line-endings configurable?

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: is psql treatment of line-endings configurable?
Date: 2014-01-04 00:27:42
Message-ID: 1388795262189-5785281.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Using psql 9.3 against a 9.0 server.

I send queries to the server via a windows based client which uses and sends
"\r\n" for the newline. When running this query:

SELECT procpid, current_query, client_addr, xact_start, query_start FROM
pg_stat_activity

The contents of current_query display as:

|<query>\r +|
|<line two of query - blank if query is only a single line>| --the client
always sends a trailing "\r\n"

This is likely to yield a "use psql" type response and while I'd likely
forgive superfluous newlines generally the presence of the "\r" is less
tolerable (though only mildly annoying in this specific use-case) since psql
should at least attempt to be cross-compatible friendly and swallowing up
the \r along with the \n doesn't seem like it would be that challenging.

Is this just an oversight for a situation few -hackers encounter or is there
a conscious decision to leave the "\r" alone in this situation?

Aside, does/can psql (or postgres itself in storing current_query) attempt
to remove trailing newlines in situations like this?

Thanks!

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/is-psql-treatment-of-line-endings-configurable-tp5785281.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-01-04 00:55:03 Re: Creating an index alters the results returned
Previous Message Dave Cramer 2014-01-03 21:28:36 Re: [JDBC] Creating an index alters the results returned