ecpg enhance patch

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ecpg enhance patch
Date: 1999-12-27 07:49:19
Message-ID: 19991227164919G.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is a patch that would enhance the efficiency in that skip strings
which have been already checked. The patch was made by Kazuko
Nakagawa. Michael, can you comment on this?

*** ecpglib.c.orig Wed Dec 22 13:13:21 1999
--- ecpglib.c Wed Dec 22 13:37:32 1999
***************
*** 398,403 ****
--- 398,404 ----
PGresult *results;
PGnotify *notify;
struct variable *var;
+ int hostvarl = 0;

copiedquery = ecpg_strdup(stmt->command, stmt->lineno);

***************
*** 569,575 ****
return false;

strcpy(newcopy, copiedquery);
! if ((p = next_insert(newcopy)) == NULL)
{

/*
--- 570,576 ----
return false;

strcpy(newcopy, copiedquery);
! if ((p = next_insert(newcopy+hostvarl)) == NULL)
{

/*
***************
*** 582,587 ****
--- 583,589 ----
else
{
strcpy(p, tobeinserted);
+ hostvarl = strlen(newcopy);

/*
* The strange thing in the second argument is the rest of the

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 1999-12-27 09:10:00 Re: [HACKERS] database replication
Previous Message Dmitry 1999-12-27 06:34:49 Re: question about MS Access connect to Postgresql 6.5.2-1