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: 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:14:49
Message-ID: 61899.71997.qm@web31801.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
--- Phillip Smith <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au> wrote:
> Backslash ('\') will also cause problems. Replace them with double-backslash
> ('\\')

You can turn alter postgresql behavior towards backslash using standard_conforming_strings.

SET standard_conforming_strings = on;

http://www.postgresql.org/docs/8.2/static/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION

This way backslashes are treated as any other character.

when you are done:

SET standard_conforming_strings = off;

Regards,
Richard Broersma Jr.

In response to

Responses

pgsql-novice by date

Next:From: Richard Broersma JrDate: 2007-09-25 04:21:22
Subject: Re: inserting/updating a field with the contents of a text file
Previous:From: Richard Broersma JrDate: 2007-09-25 04:08:24
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