~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

Viewing changes to doc/src/sgml/xaggr.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- $PostgreSQL: pgsql/doc/src/sgml/xaggr.sgml,v 1.37 2008/12/28 18:53:54 tgl Exp $ -->
 
1
<!-- $PostgreSQL: pgsql/doc/src/sgml/xaggr.sgml,v 1.38 2009/06/20 18:45:28 tgl Exp $ -->
2
2
 
3
3
 <sect1 id="xaggr">
4
4
  <title>User-Defined Aggregates</title>
175
175
            (IsA(fcinfo-&gt;context, AggState) ||
176
176
             IsA(fcinfo-&gt;context, WindowAggState)))
177
177
</programlisting>
178
 
   One reason for checking this is that when it is true, the first input
 
178
   One reason for checking this is that when it is true for a transition
 
179
   function, the first input
179
180
   must be a temporary transition value and can therefore safely be modified
180
181
   in-place rather than allocating a new copy.  (This is the <emphasis>only</>
181
 
   case where it is safe for a function to modify a pass-by-reference input.)
 
182
   case where it is safe for a function to modify a pass-by-reference input.
 
183
   In particular, aggregate final functions should not modify their inputs in
 
184
   any case, because in some cases they will be re-executed on the same
 
185
   final transition value.)
182
186
   See <literal>int8inc()</> for an example.
183
187
  </para>
184
188