Re: problem when optimizing the window aggregation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wang, Chaoyong" <Chaoyong(dot)Wang(at)emc(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: problem when optimizing the window aggregation
Date: 2012-08-22 01:47:13
Message-ID: 1318.1345600033@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Wang, Chaoyong" <Chaoyong(dot)Wang(at)emc(dot)com> writes:
> I used the function datumCopy as following:

> peraggstate->transValue = datumCopy(peraggstate->tempTransValue,
> peraggstate->transtypeByVal, peraggstate->transtypeLen);

You need to guard that with an is-null check, because datumCopy isn't
designed to cope with null values. (Which is historical, I guess, but
we're not likely to change it now.) If you look around you will find
plenty of examples of this coding pattern.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-08-22 01:51:14 Re: multi-master pgbench?
Previous Message Tatsuo Ishii 2012-08-22 01:13:43 Re: multi-master pgbench?