Re: scan.l: check_escape_warning()

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: scan.l: check_escape_warning()
Date: 2008-01-11 17:27:01
Message-ID: 4787A6E5.9000801@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-01-11 17:31:30 Re: Dynamic Partitioning using Segment Visibility Maps
Previous Message Zeugswetter Andreas ADI SD 2008-01-11 16:31:14 Re: Dynamic Partitioning using Segment Visibility Maps