pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyle Bateman <kyle@actarg.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: possible parser error
Date: Fri, 21 Apr 2000 23:52:44 -0400
Message-ID: <24406.956375564@sss.pgh.pa.us> (raw)
In-Reply-To: <3773EFA9.F354E501@actarg.com>
References: <3773EFA9.F354E501@actarg.com>

(I'm cleaning out old email tonight...)

A good long while ago, you wrote:
> I'm using v6.5.  I found out accidentally that the query:

> update table set field = value' where key = keyvalue;          --notice
> the accidental tick

> silently ignores everything after the tick and does not generate any
> kind of syntax error.  This quietly clobbered a table by updating the
> field in every record in the table.  (The where clause was ignored.)

> The tick shouldn't have been there, it was just a typing error.  But
> unless I'm missing something, it seems like it would be good to
> generate an error like "Unmatched quotes" or some such thing.

FWIW, this is fixed in 7.0.  I do not believe it's possible to make
this sort of mistake in psql (because psql won't send an incomplete
quoted string to the backend), but it's surely possible in other
interfaces or when using libpq directly.  7.0 gives:

ERROR:  Unterminated quoted string

			regards, tom lane



view thread (2+ messages)

Message-ID: <24406.956375564@sss.pgh.pa.us>
Permalink:  ../24406.956375564@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24406.956375564@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kyle@actarg.com
  Subject: Re: possible parser error
  In-Reply-To: <24406.956375564@sss.pgh.pa.us>
  References: <3773EFA9.F354E501@actarg.com> <24406.956375564@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