~ubuntu-branches/ubuntu/precise/postgresql-9.1/precise-security

« back to all changes in this revision

Viewing changes to src/include/access/tupconvert.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * tupconvert.h
 
4
 *        Tuple conversion support.
 
5
 *
 
6
 *
 
7
 * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
 
8
 * Portions Copyright (c) 1994, Regents of the University of California
 
9
 *
 
10
 * src/include/access/tupconvert.h
 
11
 *
 
12
 *-------------------------------------------------------------------------
 
13
 */
 
14
#ifndef TUPCONVERT_H
 
15
#define TUPCONVERT_H
 
16
 
 
17
#include "access/htup.h"
 
18
 
 
19
 
 
20
typedef struct TupleConversionMap
 
21
{
 
22
        TupleDesc       indesc;                 /* tupdesc for source rowtype */
 
23
        TupleDesc       outdesc;                /* tupdesc for result rowtype */
 
24
        AttrNumber *attrMap;            /* indexes of input fields, or 0 for null */
 
25
        Datum      *invalues;           /* workspace for deconstructing source */
 
26
        bool       *inisnull;
 
27
        Datum      *outvalues;          /* workspace for constructing result */
 
28
        bool       *outisnull;
 
29
} TupleConversionMap;
 
30
 
 
31
 
 
32
extern TupleConversionMap *convert_tuples_by_position(TupleDesc indesc,
 
33
                                                   TupleDesc outdesc,
 
34
                                                   const char *msg);
 
35
 
 
36
extern TupleConversionMap *convert_tuples_by_name(TupleDesc indesc,
 
37
                                           TupleDesc outdesc,
 
38
                                           const char *msg);
 
39
 
 
40
extern HeapTuple do_convert_tuple(HeapTuple tuple, TupleConversionMap *map);
 
41
 
 
42
extern void free_conversion_map(TupleConversionMap *map);
 
43
 
 
44
#endif   /* TUPCONVERT_H */