I am running a psql batch script and formatting the output as xml. The problem I am running into is that there is a + character in the output. I want to simply use a newline character instead of a plus. I have tried quite a few different arguments and surprised a thorough google search didn't turn up an answer. I am assuming I can use the pset option to change the output eol character but I was unable to get this to work. The script calls query_to_xml on a stored function.
Calling Batch Script
psql -t -q -U user -h database-qa.example.com -f db_test_query.sql -o output.xml DatabaseToUse
Example Output
<row xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +
+
<order_id>12345</order_id> +
<status_id>ORDER_COMPLETED</status_id> +
<customer_id>9999</customer_id> +
<company_name>ExampleComany</company_name> +
<main_contact_name>user</main_contact_name> +
<email_address>[email protected]</email_address> +
<country_code xsi:nil="true"/> +
<local_number>1112223333</local_number> +
<address1>1009 Customer Ln</address1> +
<address2></address2> +
<city>Houston</city> +
<state_province_geo_id>TX</state_province_geo_id> +
<postal_code>77380</postal_code> +
...