By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,513 Members | 798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,513 IT Pros & Developers. It's quick & easy.

Weird psql problem

P: n/a
I recently noticed that in my web app, a \n wasn't getting converted to
a <br />. (The problem turned out to be that for this particular
record, it was a \r).

When I checked out the record in psql, I got some weird behavior.

What shows up in the web:
amoth4:it is o.o
jm:Speaking of being a sounding board, will you test something?
jm:Ot
jm:It's pretty quick

What shows up in psql:
jmelloy=# select * from messages where message_id = 219897;
message_id | message_date |
message
| sender_id | recipient_id |
message_idx
------------+----------------------------
+-----------------------------------------------------------------------
--------------------------------------+-----------+--------------
+-----------------------------------------------------------------------
----------------
jm:It's pretty quick | 4 | 126 | 's' 'jm' 'ot' 'o.o'
'test' 'board' 'quick' 'sound' 'speak' 'amoth4' 'pretti' 'someth'

Something is definitely weird. Using version 7.3 on OS X.

Jeff
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On Tue, Aug 26, 2003 at 10:06:51AM -0500, Jeffrey Melloy wrote:
I recently noticed that in my web app, a \n wasn't getting converted to
a <br />. (The problem turned out to be that for this particular
record, it was a \r).

When I checked out the record in psql, I got some weird behavior.

What shows up in the web:
amoth4:it is o.o
jm:Speaking of being a sounding board, will you test something?
jm:Ot
jm:It's pretty quick
On many terminals, \r jumps back to the beginning of the line. Hence in this
example:
jm:It's pretty quick | 4 | 126 | 's' 'jm' 'ot' 'o.o'
'test' 'board' 'quick' 'sound' 'speak' 'amoth4' 'pretti' 'someth'
you're not seeing the starting text because it's overwritten by the later
text.

--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ "All that is needed for the forces of evil to triumph is for enough good
men to do nothing." - Edmond Burke
"The penalty good people pay for not being interested in politics is to be
governed by people worse than themselves." - Plato


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/TKiJY5Twig3Ge+YRApqVAJ9png0iyXW5wCFUoaOLrtqHIRHkNA CfdzzO
4xUsYSa8LrX5uKxp9QRkbJc=
=kIx+
-----END PGP SIGNATURE-----

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.