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

Re: Re: Escaping strings for inclusion into SQL queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Florian Weimer <Florian(dot)Weimer(at)RUS(dot)Uni-Stuttgart(dot)DE>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Escaping strings for inclusion into SQL queries
Date: 2001-09-04 00:10:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)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

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-09-04 00:16:52
Subject: Re: Bytea/Base64 encoders for libpq - interested?
Previous:From: Tom LaneDate: 2001-09-03 23:08:11
Subject: Re: Re: Toast,bytea, Text -blob all confusing

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