Herouth Maoz wrote: <blockquote type="CITE">At 16:31 +0300 on 30/06/1999, Thomas Lockhart wrote: <p>> And seems to
be:<br />> <br />> postgres=> select * from mytable' where id = 1234; <br />> postgres'> ' <br />>
postgres->; <br />> ERROR: parser: parse error at or near "'" <br />> postgres=> <br />> <br />>
Thisis on a RH5.2 system with with the cvs distribution of Postgres <br />> (rather than v6.5 exactly). But the
parsingbehavior should be the <br />> same. I'm not sure what could be different in our installations... <p>In psql,
itwill probably never be a problem, because it demands that you <br />close the quotation mark (that "postgres'>"
prompt).It doesn't send <br />anything to the backend until you have closed the quotation and type \g or <br />';'.
<p>Butwhat happens if the above query is sent through one of the other <br />interfaces, like pqlib? <br /><a
href="http://telem.openu.ac.il/~herutma"></a> </blockquote>I did a little more testing on it. <p>When running pqsl in
interactivemode, everything works out OK. Pqsl insists on getting the last terminating quote. However, if you enter:
<p>psqlmydb -c "select * from mytable' where id = 1234;" <p>you get the whole table, not just the one record. I first
noticedthe problem using the TCL interface so I know it exists there as well as in non-interactive psql. <br />
<pre>--
----------------------------------------------------
Kyle Bateman President, Action Target Inc.
"Viva Yo!" kyle@actarg.com (801)377-8033x101
----------------------------------------------------</pre>