From cc332d612b4460e1345c65dfa5b543a74216c3ef Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Thu, 21 Aug 1997 04:10:25 +0000 Subject: AttrConstr --> TupleConstr --- src/include/access/tupdesc.h | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'src/include/access/tupdesc.h') diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index cad6d01abe..a571e9a7dd 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tupdesc.h,v 1.6 1997/08/19 04:45:20 vadim Exp $ + * $Id: tupdesc.h,v 1.7 1997/08/21 04:10:25 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -17,23 +17,38 @@ #include #include -typedef struct attrConstr { -/*------------------------------------------------------------------------ - This structure contains flags to the constraints of a tuple - ------------------------------------------------------------------------*/ - bool has_not_null; -} AttrConstr; +typedef struct attrDefault { + AttrNumber adnum; + char *adbin; + char *adsrc; +} AttrDefault; + +typedef struct constrCheck { + char *ccname; + char *ccbin; + char *ccsrc; +} ConstrCheck; + +/* This structure contains constraints of a tuple */ +typedef struct tupleConstr { + AttrDefault *defval; + ConstrCheck *check; + uint16 num_defval; + uint16 num_check; + bool has_not_null; +} TupleConstr; + +/* + * This structure contains all information (i.e. from Classes + * pg_attribute, pg_attrdef, pg_relcheck) for a tuple. + */ typedef struct tupleDesc { -/*------------------------------------------------------------------------ - This structure contains all the attribute information (i.e. from Class - pg_attribute) for a tuple. --------------------------------------------------------------------------*/ int natts; /* Number of attributes in the tuple */ AttributeTupleForm *attrs; /* attrs[N] is a pointer to the description of Attribute Number N+1. */ - AttrConstr *constr; + TupleConstr *constr; } *TupleDesc; extern TupleDesc CreateTemplateTupleDesc(int natts); -- cgit v1.2.1