Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #421
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Newsgroups | comp.databases.postgresql |
| Subject | Re: Line breaks in PostgreSQL tables |
| Date | 2012-11-01 23:37 +0100 |
| Message-ID | <afgbtkF7ruuU1@mid.individual.net> (permalink) |
| References | <k6pmsh$qir$1@news.albasani.net> <afdaa5Fh1quU1@mid.individual.net> <k6rvsl$13g$1@news.albasani.net> |
On 31.10.2012 20:58, Franz Kruse wrote: > Robert Klemme: > >>> We just started to use PostgreSQL. For new table entries (type TEXT) we >>> find line breaks represented as \r\n (the Windows convention), wich is >>> OK when shown in a browser, but causes strange multiple empty lines when >>> these entries are sent via email. >>> >>> Can this behaviour be configured, such that simple \n are used for line >>> breaks? >> >> I'd assume that PG happily stores what you insert so it's probably a >> client side issue. Are you inserting from Windows? > > The inserts take place on a Linux machine in a Perl CGI script that gets > its data from web forms sent from different computers in the world. A > test showed that it makes no difference whether the web request comes > from a Windows machine or a Linux machine. This makes me believe PG > itself decides to separate text lines with <CR><LF> sequences. Is this a > standard in PG? Or can the line separator be configured? See Matthew's answer. Believing usually leads to bad results in software engineering. :-) It's better to verify facts - in this case actually find out what you actually insert into the database (e.g. via degugging or logging). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Line breaks in PostgreSQL tables Franz Kruse <Franz.Kruse@t-online.de> - 2012-10-31 00:12 +0100
Re: Line breaks in PostgreSQL tables Robert Klemme <shortcutter@googlemail.com> - 2012-10-31 19:51 +0100
Re: Line breaks in PostgreSQL tables Franz Kruse <Franz.Kruse@t-online.de> - 2012-10-31 20:58 +0100
Re: Line breaks in PostgreSQL tables mattheww@chiark.greenend.org.uk (Matthew Woodcraft) - 2012-10-31 20:39 +0000
Re: Line breaks in PostgreSQL tables Robert Klemme <shortcutter@googlemail.com> - 2012-11-01 23:37 +0100
Re: Line breaks in PostgreSQL tables Jasen Betts <jasen@xnet.co.nz> - 2012-11-01 08:53 +0000
csiph-web