From: | "Zhong Xubin" <jackyzhongxp(at)msn(dot)com> |
---|---|
To: | pgman(at)candle(dot)pha(dot)pa(dot)us, tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: pgsql 8.0 beta1 patch for token and timezone |
Date: | 2004-10-08 14:51:33 |
Message-ID: | BAY11-F15gFrYILoygX000229d0@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi All,
Great thanks for your kindness and quick reply. Fixing those bugs
will help many people in China who plan to study Pgsql.
Regards,
Jacky
>From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
>To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>CC: Zhong Jacky <jackyzhongxp(at)msn(dot)com>, pgsql-bugs(at)postgresql(dot)org
>Subject: Re: [BUGS] pgsql 8.0 beta1 patch for token and timezone
>Date: Thu, 7 Oct 2004 13:29:11 -0400 (EDT)
>
>OK, fixed.
>
>---------------------------------------------------------------------------
>
>Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > + /*
> > > + * Escape any single quotes or backslashes in locale
> > > + */
> > > + static void
> > > + escape_locale(char **locale)
> > > + {
> > > + int len = strlen(*locale),
> > > + i, j;
> > > + char *loc_temp = xmalloc(len * 2);
> > > +
> > > + for (i = 0, j = 0; i < len; i++)
> > > + {
> > > + if ((*locale)[i] == '\'' || (*locale)[i] == '\\')
> > > + loc_temp[j++] = '\\';
> > > + loc_temp[j++] = (*locale)[i];
> > > + }
> > > + *locale = loc_temp;
> > > + }
> >
> > Surely this is quite broken. You need to xmalloc one more byte and
> > add a '\0'.
> >
> > regards, tom lane
> >
> > ---------------------------(end of
broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html
> >
>
>--
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania
19073
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2004-10-08 15:57:34 | 8.0.0beta3 plpython link troubles |
Previous Message | Mason | 2004-10-08 08:45:29 | COPY bug on 7.3.4 whe copying lots of data |