pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Kyle Bateman <kyle@actarg.com>
Cc: pgsql-ports@postgreSQL.org
Subject: Re: [PORTS] Port Bug Report: parse error not detected on unterminated quote
Date: Wed, 30 Jun 1999 13:31:51 +0000
Message-ID: <377A1C47.5E480EAB@alumni.caltech.edu> (raw)
References: <199906291746.NAA20468@hub.org>

> Problem Description:
> --------------------
> If a single quote is left unmatched in the query, the parser
> seems to throw away the rest of the line without detecting
> an error.
> Test Case:
> ----------
> Enter a select like this:
> select * from mytable where id = 1234;
> You should get only one record.
> 
> Now put in an errant single quote:
> select * from mytable' where id = 1234;
> Now you get the whole table.  This should really be a
> syntax error of some kind.

And seems to be:

postgres=> select * from mytable' where id = 1234;
postgres'> '
postgres-> ;
ERROR:  parser: parse error at or near "'"
postgres=>

This is on a RH5.2 system with with the cvs distribution of Postgres
(rather than v6.5 exactly). But the parsing behavior should be the
same. I'm not sure what could be different in our installations...

                     - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California



view thread (5+ messages)  latest in thread

Message-ID: <377A1C47.5E480EAB@alumni.caltech.edu>
Permalink:  ../377A1C47.5E480EAB@alumni.caltech.edu/
Also on:    postgresql.org/message-id/377A1C47.5E480EAB@alumni.caltech.edu

 · 

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: lockhart@alumni.caltech.edu, kyle@actarg.com, pgsql-ports@postgreSQL.org
  Subject: Re: [PORTS] Port Bug Report: parse error not detected on unterminated quote
  In-Reply-To: <377A1C47.5E480EAB@alumni.caltech.edu>
  References: <199906291746.NAA20468@hub.org> <377A1C47.5E480EAB@alumni.caltech.edu>

* 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