UPDATE table: Syntax to Remove Terminal '\n'

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: UPDATE table: Syntax to Remove Terminal '\n'
Date: 2014-08-27 22:31:34
Message-ID: alpine.LNX.2.11.1408271523400.11534@localhost
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have some rows in a table where a column attribute has a newline (\n)
appended to the string. How do I represent that newline character in a SQL
statement using psql?

I've tried adding E'\n' to the end of the string but that doesn't work.

Here's what I see when I select distinct for that column:

StarvationCrk+

That's a blank line below the name.

TIA,

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Barwick 2014-08-27 23:04:26 Re: UPDATE table: Syntax to Remove Terminal '\n'
Previous Message Jim Garrison 2014-08-27 22:22:43 Atomicity of INSERT INTO ... SELECT ... WHERE NOT EXISTS ...