Small patches in copy.c and trigger.c - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Small patches in copy.c and trigger.c
Date
Msg-id m107Q4B-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
Responses Re: [HACKERS] Small patches in copy.c and trigger.c
Re: [HACKERS] Small patches in copy.c and trigger.c
List pgsql-hackers
Hi,

    I've  just  committed  two  very simple patches to copy.c and
    trigger.c which caused backend to grow until transaction end.

    trigger.c  didn't  expected  that trigger function could have
    returned another heap tuple that was built inside of  trigger
    with SPI_copytuple().

    In  copy.c  I'n  not absolutely sure why it was as it was. In
    CopyFrom() the array  for  the  values  was  palloc()'d  once
    before  entering  the copy loop, and then again at the top of
    the loop. But there was only one pfree() after loop exited.

    I've removed the palloc() inside the loop. Seems to work  for
    the  regression  test. Telling here only for the case someone
    encounters problems on COPY FROM.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Goran Thyni
Date:
Subject: New patch (was: tough bug)
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Small patches in copy.c and trigger.c