Re: BUG #1099: bad syntax error localisation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1099: bad syntax error localisation
Date: 2004-03-11 15:57:08
Message-ID: 20207.1079020628@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> PostgreSQL Bugs List wrote:
>> CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
>> AS 'not even SQL';
>> ERROR: syntax error at or near "not" at character 1

> The error message refers to the function body, which is parsed
> separately and therefore starts the count at 1.

I'm surprised there is no CONTEXT line here though. You would have
gotten one for a syntax error in plpgsql; I must have overlooked doing
it for SQL.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2004-03-11 19:07:14 Re: Glitch: cannot use Arrays with Raise Notice
Previous Message Tom Lane 2004-03-11 15:24:03 Re: BUG #1098: Multiple ON INSERT rules not applied properly in the case of INSERT...SELECT