pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Megalex <megalex@klanomega.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: problems with single quotes..
Date: Sun, 02 Dec 2001 10:00:22 -0500
Message-ID: <20966.1007305222@sss.pgh.pa.us> (raw)
In-Reply-To: <000b01c07680$29fb2430$0301a8c0@klanomega.com>
References: <20011201182212.R74581-100000@megazone23.bigpanda.com>
	<000b01c07680$29fb2430$0301a8c0@klanomega.com>

"Megalex" <megalex@klanomega.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



view thread (12+ messages)  latest in thread

Message-ID: <20966.1007305222@sss.pgh.pa.us>
Permalink:  ../20966.1007305222@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20966.1007305222@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, megalex@klanomega.com
  Subject: Re: problems with single quotes..
  In-Reply-To: <20966.1007305222@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox