Skip site navigation (1) Skip section navigation (2)

Re: inserting/updating a field with the contents of a text file

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, Phillip Smith <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>, 'Lonni J Friedman' <netllama(at)gmail(dot)com>
Cc: 'George Pavlov' <gpavlov(at)mynewplace(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: inserting/updating a field with the contents of a text file
Date: 2007-09-25 04:21:22
Message-ID: 27901.67545.qm@web31806.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
--- Richard Broersma Jr <rabroersma(at)yahoo(dot)com> wrote:

Here is a test case:

postgres=# SELECT 'This\nis my\ntext';
WARNING:  nonstandard use of escape in a string literal
LINE 1: SELECT 'This\nis my\ntext';
               ^
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
 ?column?
----------
 This
 is my
 text
(1 row)

postgres=# SELECT $my_quote$This\nis my\ntext$my_quote$;
     ?column?
-------------------
 This\nis my\ntext
(1 row)

postgres=# set standard_conforming_strings = on;
SET
postgres=# SELECT 'This\nis my\ntext';
     ?column?
-------------------
 This\nis my\ntext
(1 row)

postgres=# SELECT $my_quote$This\nis\tmy\ntext$my_quote$;
      ?column?
--------------------
 This\nis\tmy\ntext
(1 row)

postgres=#

In response to

pgsql-novice by date

Next:From: Rajaram JDate: 2007-09-25 07:12:47
Subject: Messages on my console.
Previous:From: Richard Broersma JrDate: 2007-09-25 04:14:49
Subject: Re: inserting/updating a field with the contents of a text file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group