From: Kyle Bateman <kyle@actarg.com>
To: pgsql-sql@postgresql.org
Cc: Herouth Maoz <herouth@oumail.openu.ac.il>
Subject: Re: [PORTS] Port Bug Report: parse error not detected onunterminated quote
Date: Wed, 30 Jun 1999 08:36:55 -0600
Message-ID: <377A2B87.AF707E46@actarg.com> (raw)
References: <199906291746.NAA20468@hub.org>
<l03130306b39fd51af2c4@[147.233.159.109]>
Herouth Maoz wrote:
> At 16:31 +0300 on 30/06/1999, Thomas Lockhart wrote:
>
> > 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...
>
> In psql, it will probably never be a problem, because it demands that you
> close the quotation mark (that "postgres'>" prompt). It doesn't send
> anything to the backend until you have closed the quotation and type \g or
> ';'.
>
> But what happens if the above query is sent through one of the other
> interfaces, like pqlib?
>
I did a little more testing on it.
When running pqsl in interactive mode, everything works out OK. Pqsl insists
on getting the last terminating quote. However, if you enter:
psql mydb -c "select * from mytable' where id = 1234;"
you get the whole table, not just the one record. I first noticed the
problem using the TCL interface so I know it exists there as well as in
non-interactive psql.
--
----------------------------------------------------
Kyle Bateman President, Action Target Inc.
"Viva Yo!" kyle@actarg.com (801)377-8033x101
----------------------------------------------------
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: kyle@actarg.com, herouth@oumail.openu.ac.il
Subject: Re: [PORTS] Port Bug Report: parse error not detected onunterminated quote
In-Reply-To: <377A2B87.AF707E46@actarg.com>
References: <199906291746.NAA20468@hub.org> <l03130306b39fd51af2c4@[147.233.159.109]> <377A2B87.AF707E46@actarg.com>
* 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