Re: scan.l: check_escape_warning() - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: scan.l: check_escape_warning()
Date
Msg-id 4787A6E5.9000801@dunslane.net
Whole thread Raw
In response to scan.l: check_escape_warning()  (Michael Meskes <meskes@postgresql.org>)
List pgsql-hackers

Michael Meskes wrote:
> Hi, 
>
> could anyone please enlighten me whether this function is still needed?
> AFAICT check_escape_warning() only has significant action if
> warn_on_first_escape is true. This variable is set to true only on label
> xqstart, but to false on xestart. However, check_escape_warning() and
> check_string_escape_warning() btw. are only called in mode xe. Seems to
> me that both are never called, or what am I missing?
>   


What you are missing is that xqstart can lead to mode xe if 
standard_conforming_strings is false:

{xqstart}       {                   warn_on_first_escape = true;                   saw_high_bit = false;
  SET_YYLLOC();                   if (standard_conforming_strings)                       BEGIN(xq);
else                      BEGIN(xe);                   startlit();               }
 


cheers

andrew



pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Dynamic Partitioning using Segment Visibility Maps
Next
From: Simon Riggs
Date:
Subject: Re: Dynamic Partitioning using Segment Visibility Maps