Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA13805 for ; Wed, 30 Jun 1999 09:30:34 -0400 (EDT) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id NAA12256; Wed, 30 Jun 1999 13:31:51 GMT Sender: lockhart@hub.org Message-ID: <377A1C47.5E480EAB@alumni.caltech.edu> Date: Wed, 30 Jun 1999 13:31:51 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: Kyle Bateman CC: pgsql-ports@postgreSQL.org Subject: Re: [PORTS] Port Bug Report: parse error not detected on unterminated quote References: <199906291746.NAA20468@hub.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > 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