From: | "William ZHANG" <uniware(at)zedware(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: beta2 make check failed on Win32 |
Date: | 2005-09-21 12:12:24 |
Message-ID: | dgriph$28im$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
What you find is in initdb.c. Maybe the author want to make single quotes
escaped just the same as in SQL. But guc-file.l is unaware of it.
"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> wrote
>
> Diff current version vs. some earlier version, you see this:
>
> /*
> * signal handler in case we are interrupted.
> @@ -1951,12 +2035,12 @@ escape_quotes(const char *src)
> {
> int len = strlen(src),
> i, j;
> - char *result = xmalloc(len * 2 + 1);
> + char *result = pg_malloc(len * 2 + 1);
>
> for (i = 0, j = 0; i < len; i++)
> {
> - if (src[i] == '\'' || src[i] == '\\')
> - result[j++] = '\\';
> + if (SQL_STR_DOUBLE(src[i]))
> + result[j++] = src[i];
> result[j++] = src[i];
> }
>
> So the problem is this line:
>
> result[j++] = src[i];
>
> That is, use the old line then the 'People\'s republic of China' string
gets
> right. But I am quite sure if revoke this will affect other things.
>
> Regards,
> Qingqing
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Hans-Jürgen Schönig | 2005-09-21 13:29:45 | feature proposal ... |
Previous Message | Qingqing Zhou | 2005-09-21 09:31:32 | Re: beta2 make check failed on Win32 |