| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Ben Lamb <pgsql-patches(at)zurgy(dot)org> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: Patch for PGunescapeBytea |
| Date: | 2003-06-12 01:16:49 |
| Message-ID: | 200306120116.h5C1Gnl11144@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Patch applied. Thanks.
---------------------------------------------------------------------------
Ben Lamb wrote:
> Here is a new patch for src/interfaces/libpq/fe-exec.c that incorporates the
> change suggested by Magnus. The patch significantly improves the speed of
> PGunescapeBytea().
>
> Ben.
>
>
> > [snip]
> >
> > I think these lines:
> >
> > buffer = realloc(buffer, buflen);
> > ---
> > if (buffer == NULL)
> > return NULL;
> > ---
> >
> > are wrong. Shouldn't one do:
> > ---
> > tmpbuf=realloc(buf,...);
> > if (!tmpbuf)
> > free(buf), return 0;
> > ---
> >
> > to avoid a memory leak?
> >
> > ... just checking ;)
> >
> > Magnus
>
[ Attachment, skipping... ]
>
> ---------------------------(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
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 4.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-06-12 01:36:50 | Re: pg_autovacuum update |
| Previous Message | Josh Berkus | 2003-06-11 23:25:22 | Re: [HACKERS] "Adding missing from clause" (replacement) |