Re: CASE control block broken by a single line comment

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Wienhold <ewie@ewie.name>
Cc: Michal Bartak <maxym.srpl@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-04-12T22:20:58Z
Lists: pgsql-hackers
Erik Wienhold <ewie@ewie.name> writes:
> I'm surprised that the lexer handles compound tokens.  I'd expect to
> find that in the parser, especially because of using the context-aware
> plpgsql_ns_lookup to determine if we have a T_DATUM or T_{WORD,CWORD}.

I'm not here to defend plpgsql's factorization ;-).  However, it
doesn't really have a parser of its own, at least not for expressions,
so I'm not sure how your suggestion could be made to work.

			regards, tom lane



Commits

  1. Fix plpgsql's handling of -- comments following expressions.