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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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