Re: Re: Escaping strings for inclusion into SQL queries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: Escaping strings for inclusion into SQL queries
Date
Msg-id 12273.999562219@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Escaping strings for inclusion into SQL queries  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: Escaping strings for inclusion into SQL queries  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> A bug indeed.

>  <xd>{xddouble} {
> -                                       addlit(yytext, yyleng-1);
> +                                       addlit(yytext+1, yyleng-1);
>                                 }

I don't follow.  xddouble can only expand to two quote marks, so how
does it matter which one we use as the result?  This seems unlikely
to change the behavior.  If it does, I think the real bug is elsewhere.

I do see a bug here --- I get

regression=# select """";
NOTICE:  identifier """ [ lots o' rubouts ] @;�" will be truncated to
""""
ERROR:  Attribute '""' not found
regression=#
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Toast,bytea, Text -blob all confusing
Next
From: Bruce Momjian
Date:
Subject: Re: Bytea/Base64 encoders for libpq - interested?