473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Weird psql problem

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
1 1509
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
4
by: Phil Campaigne | last post by:
Hi All, I just installed postgresql 7.3.4 as an upgrade to 7.3.2 and all went well untill I tried to log into a database that I successfully created. Here are the steps in question: bash-2.05b$...
7
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also...
4
by: Brendan Jurd | last post by:
Hello all, I just wanted to pass on some information about compatibility between the psql client and the postgres server. On a particular network, my workstation and the server are both debian...
2
by: Russ Brown | last post by:
Hello, Today I tried connecting to my database locally via psql. I got the usual welcome & basic help messages, but it never got to the prompt: it just hung. So I checked top and the psql...
2
by: Jeffrey W. Baker | last post by:
I just noticed something unexpected when using psql. I had written a shell script to bulk-load some hundreds of files into a database, and move each file to success/ or failure/ directories...
33
by: John Sidney-Woollett | last post by:
With the advent of postgres v8, would it be possible to change the default behaviour of psql from AUTOCOMMIT=ON to AUTOCOMMIT=OFF ? Although this might break backward compatibility, it might be...
3
by: Anony Mous | last post by:
Hi, I've run into a problem. I've had postgres V8 beta on my WinXP Pro machine for some time now, and it's been running great. Now, for some reason, I cannot issue any queries to the database...
4
by: Jim Seymour | last post by:
Hi, Environment: SunOS 5.7 Generic_106541-29 sun4u sparc SUNW,UltraSPARC-IIi-Engine Postgresql-7.4.6 Build config: --with-java --enable-thread-safety gcc version 3.3.1 less-381 readline-4.3
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.