Re: Escaping literal strings in pg_8.4

From: Willy-Bas Loos <willybas(at)gmail(dot)com>
To: Ennio-Sr <nasr(dot)laili(at)tin(dot)it>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Escaping literal strings in pg_8.4
Date: 2012-04-19 16:32:27
Message-ID: CAHnozTj1QZV9u2+Pn+1L8vwQZEBS86DC=Ey=4cBVCX+xX6sK3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

>Oh, I realize I was putting the 'E' in the wrong place:
Well yes, but that was not what caused the error. It was the quote.
If you use COPY (or \copy from psql without superuser rights) you can use
TABs to delimit the input. Escaping quotes not necessary, unless your text
also contains tabs.

Also, quote_literal(text) can come in handy, but in different scenario's.

cheers,

WBL

--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Owen Sleep 2012-04-19 17:45:54 logging pg_dump results in windows 7
Previous Message Ennio-Sr 2012-04-19 14:45:35 Re: Escaping literal strings in pg_8.4