Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group