Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Date
Msg-id 20091008145629.GB5510@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
Alvaro Herrera wrote:

> alvherre=# select 'a'
> alvherre-# 'b';
>  ?column?
> ----------
>  ab
> (1 fila)

Ah, yes -- saith scan.l:

/*
 * SQL requires at least one newline in the whitespace separating
 * string literals that are to be concatenated.  Silly, but who are we
 * to argue?  Note that {whitespace_with_newline} should not have * after
 * it, whereas {whitespace} should generally have a * after it...
 */

special_whitespace      ({space}+|{comment}{newline})
horiz_whitespace        ({horiz_space}|{comment})
whitespace_with_newline ({horiz_whitespace}*{newline}{special_whitespace}*)


--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Next
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped