Re: ecpg enhance patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: SAKAIDA Masaaki <sakaida(at)psn(dot)co(dot)jp>
Cc: Michael Meskes <meskes(at)postgreSQL(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: ecpg enhance patch
Date: 2000-10-02 16:00:46
Message-ID: 200010021600.MAA21537@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have committed this patch. It offers a speed up to ecpg.

>
> Michael Meskes <meskes(at)postgresql(dot)org> wrote:
>
> > On Sat, Jun 03, 2000 at 11:22:19AM +0900, SAKAIDA Masaaki wrote:
> > > The following patch could solve the next error cases in 6.5.3-ecpglib.
> > >
> > > case 1.
> > > strcpy(str, "T''EST'TEST");
> > > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;
> > >
> > > error(-201)(Too many arguments line 1025.
> > >
> > > case 2.
> > > str( str, "T'''?'ESTTEST");
> > > exec sql insert into ecpg_test values ( 11, :str, 'kobe' ) ;
> > >
> > > error(-202)(Too few arguments line 1024.)
> > >
> > >
> > > However, these problems seems to be solved in 7.0-ecpglib.
> >
> > So that means the patch is not needed anymore?
>
> In the meaning of bug-fix, the patch is not needed. Because you
> have already modified "next_insert()" in 7.0-ecpglib. However
> in the meaning of speed-up, the patch will be needed.
> --
> Regards,
> SAKAIDA Masaaki -- Osaka, Japan
>
>
> *** postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c.orig Tue Jun
> 6 15:02:34 2000
> --- postgresql-7.0.1/src/interfaces/ecpg/lib/execute.c Tue Jun 6 15:02:05 2000
> ***************
> *** 278,283 ****
> --- 278,284 ----
> char *tobeinserted = NULL;
> char *p;
> char buff[20];
> + int hostvarl = 0;
>
> /*
> * Some special treatment is needed for records since we want
> ***************
> *** 559,565 ****
> return false;
>
> strcpy(newcopy, copiedquery);
> ! if ((p = next_insert(newcopy)) == NULL)
> {
>
> /*
> --- 560,566 ----
> return false;
>
> strcpy(newcopy, copiedquery);
> ! if ((p = next_insert(newcopy + hostvarl)) == NULL)
> {
>
> /*
> ***************
> *** 572,577 ****
> --- 573,579 ----
> else
> {
> strcpy(p, tobeinserted);
> + hostvarl = strlen(newcopy);
>
> /*
> * The strange thing in the second argument is the rest of the
>
>
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2000-10-02 16:11:27 Re: www.postgresql.org
Previous Message Bruce Momjian 2000-10-02 15:49:58 Re: www.postgresql.org