Re: problems with single quotes..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Megalex" <megalex(at)klanomega(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: problems with single quotes..
Date: 2001-12-02 15:00:22
Message-ID: 20966.1007305222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Megalex" <megalex(at)klanomega(dot)com> writes:
> Insert Into table(userID,FirstName,LastName) values(1,'''\''','test')

You're not counting/escaping your quotes correctly. That literal is
unterminated:

' opening quote
'' quoted quote (to put a quote in the string)
\' escaped quote (another way to do the same)
'' quoted quote
oops you're still inside the literal

I don't know what combination of quotes and/or backslashes you actually
meant to insert, but this command is wrong.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Anthony Bouvier 2001-12-02 20:43:36 Re: Unexpected Return from Function
Previous Message Joe Conway 2001-12-02 14:52:09 Re: problems with single quotes..