Re: [BUGS] Parser failed to return an error - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: [BUGS] Parser failed to return an error
Date
Msg-id CAKFQuwYrr8Qs2rJey=C=2yjktMN8U-i+wEn=vZW-6XMMaT8J8A@mail.gmail.com
Whole thread Raw
In response to [BUGS] Parser failed to return an error  (rob stone <floriparob@gmail.com>)
Responses Re: [BUGS] Parser failed to return an error  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-bugs
On Thursday, February 2, 2017, rob stone <floriparob@gmail.com> wrote:


Linux roblaptop 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64
GNU/Linux


I was running a query like:-

SELECT TO_CHAR(my_date,'dd-mm-yyyy) FROM my_table;

and I forgot to type the second single quotation mark at the end of the
mask string.

Under psql it just hung and I had to Ctrl-C to go back to a prompt and
under JDBC it hung as well and EQ just said "error", as in a failure of
some sort.

I would have expected either a 42601 error or maybe a 03000 error to
have been returned.


At least in psql that isn't a query.  It's a multi-line query fragment.  The UI is waiting for you to enter more of the query and end the string literal that you've begun.

David J.

pgsql-bugs by date:

Previous
From: rob stone
Date:
Subject: [BUGS] Parser failed to return an error
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"