head     1.14;
branch   ;
access   ;
symbols  Version_2_1:1.10 Version_2:1.8 C_Demo_1:1.5;
locks    ; strict;
comment  @ * @;


1.14
date     92.07.09.03.54.39;  author hong;  state Exp;
branches ;
next     1.13;

1.13
date     91.11.08.15.43.36;  author kemnitz;  state Exp;
branches ;
next     1.12;

1.12
date     91.08.09.02.49.04;  author glass;  state Exp;
branches ;
next     1.11;

1.11
date     91.04.28.09.16.01;  author cimarron;  state Exp;
branches ;
next     1.10;

1.10
date     90.08.18.00.40.05;  author cimarron;  state Exp;
branches ;
next     1.9;

1.9
date     90.08.17.08.51.15;  author cimarron;  state Exp;
branches ;
next     1.8;

1.8
date     90.06.19.09.16.46;  author cimarron;  state Version_2;
branches ;
next     1.7;

1.7
date     89.09.25.11.24.27;  author cimarron;  state Exp;
branches ;
next     1.6;

1.6
date     89.09.21.19.15.12;  author hirohama;  state Exp;
branches ;
next     1.5;

1.5
date     89.09.05.17.12.59;  author mao;  state C_Demo_1;
branches ;
next     1.4;

1.4
date     89.08.11.12.08.16;  author hirohama;  state Exp;
branches ;
next     1.3;

1.3
date     89.04.12.19.56.54;  author dillon;  state Exp;
branches ;
next     1.2;

1.2
date     89.03.22.17.34.58;  author muir;  state Stab;
branches ;
next     1.1;

1.1
date     89.01.17.05.55.02;  author cimarron;  state Exp;
branches ;
next     ;


desc
@@


1.14
log
@added definition for a special tuple descriptor in executor
@
text
@/*
 * tupdesc.h --
 *	POSTGRES tuple descriptor definitions.
 */

#ifndef	TupDescIncluded		/* Include this file only once */
#define TupDescIncluded	1

/*
 * Identification:
 */
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.13 91/11/08 15:43:36 kemnitz Exp Locker: hong $"

#include "tmp/postgres.h"
#include "access/att.h"
#include "access/attnum.h"

typedef struct TupleDescriptorData {
	AttributeTupleForm	data[1];	/* VARIABLE LENGTH ARRAY */
} TupleDescriptorData;

typedef TupleDescriptorData	*TupleDescriptor;

typedef TupleDescriptorData	TupleDescD;

typedef TupleDescD		*TupleDesc;

/* special tuple descriptor used in the executor */

typedef enum {ATTVAL, ATTTUP} AttributeTag;
typedef struct ExecAttDescData {
        AttributeTag	      tag;  /* indicating whether it is single value
                                         or a tuple */
        int                   len;  /* if it is a tuple, number of atts */
        TupleDescriptor       attdesc; /* descriptor of atts: variable len */
} ExecAttDescData;
typedef ExecAttDescData *ExecAttDesc;

typedef struct ExecTupDescriptorData {
        ExecAttDesc data[1];            /* variable length array */
} ExecTupDescriptorData;
typedef ExecTupDescriptorData *ExecTupDescriptor;

/*
 * TupleDescIsValid --
 *	True iff tuple descriptor is valid.
 */
#define	TupleDescIsValid(desc) PointerIsValid(desc)

/*
 * CreateTemplateTupleDesc --
 *	Returns template of a tuple descriptor.
 *
 * Exceptions:
 *	BadArg if numberOfAttributes is non-positive.
 */
extern
TupleDesc
CreateTemplateTupleDesc ARGS((
	AttributeNumber	numberOfAttributes
));

/*
 * TupleDescInitEntry --
 *	 Initializes attribute of a (template) tuple descriptor.
 *
 * Exceptions:
 *	BadArg if desc is invalid.
 *	BadArg if attributeNumber is non-positive.
 *	BadArg if typeName is invalid.
 *	BadArg if "entry" is already initialized.
 *
 * returns true if attribute is valid or false if attribute information
 * is empty (this is the case when the type name does not exist)
 */
extern
bool
TupleDescInitEntry ARGS((
	TupleDesc	desc,
	AttributeNumber	attributeNumber,
	Name		attributeName,
	Name		typeName,
	int         attdim
));

#endif	/* !defined(TupDescIncluded) */
@


1.13
log
@fixed prototypes.
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.12 91/08/09 02:49:04 glass Exp Locker: kemnitz $"
d27 16
@


1.12
log
@bad prototype fixed
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: /n/erewhon/usr/users/glass/postgres1/src/lib/H/access/RCS/tupdesc.h,v 1.11 91/04/28 09:16:01 cimarron Exp Locker: glass $"
d66 2
a67 1
	Name		typeName
@


1.11
log
@Converted IsValid code into macros and added an improved NodeIsType scheme
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.10 90/08/18 00:40:05 cimarron Exp Locker: cimarron $"
d44 1
a44 1
	AttributeNumber	numberOfAttributes;
@


1.10
log
@eliminated less significant .h files
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.9 90/08/17 08:51:15 cimarron Exp Locker: cimarron $"
d32 1
a32 5
extern
bool
TupleDescIsValid ARGS((
	TupleDesc	desc
));
@


1.9
log
@added pathnames to #include statements
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.8 90/06/19 09:16:46 cimarron Version_2 Locker: cimarron $"
d14 1
a14 1
#include "tmp/c.h"
a16 1
#include "tmp/name.h"
@


1.8
log
@reorginized code and added support
for relation types
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.7 89/09/25 11:24:27 cimarron Exp Locker: cimarron $"
d14 4
a17 3
#ifndef C_H
#include "c.h"
#endif
a18 10
#ifndef	ATT_H
# include "att.h"
#endif
#ifndef	ATTNUM_H
# include "attnum.h"
#endif
#ifndef	NAME_H
# include "name.h"
#endif

d27 1
a27 1
typedef TupleDescD	*TupleDesc;
@


1.7
log
@moved dynamic symbol stuff to syms.h
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.6 89/09/21 19:15:12 hirohama Exp $"
a68 1
 *	BadArg if attributeName is invalid.
d70 3
d75 1
a75 1
void
@


1.6
log
@added ...SYMBOLS declarations
miscellaneous cleanup
@
text
@d12 1
a12 1
#define TUPDESC_H	"$Header: RCS/tupdesc.h,v 1.5 89/09/05 17:12:59 mao C_Demo_1 Locker: hirohama $"
a79 5

#define TUPDESC_SYMBOLS \
	SymbolDecl(TupleDescIsValid, "_TupleDescIsValid"), \
	SymbolDecl(CreateTemplateTupleDesc, "_CreateTemplateTupleDesc"), \
	SymbolDecl(TupleDescInitEntry, "_TupleDescInitEntry")
@


1.5
log
@Working version of C-only demo
@
text
@a3 3
 *
 * Identification:
 *	$Header: tupdesc.h,v 1.4 89/08/11 12:08:16 hirohama Exp $
d9 5
d18 9
a26 3
#include "att.h"
#include "attnum.h"
#include "name.h"
d80 5
@


1.4
log
@added definitions for tuple descriptor validation and construction routines
@
text
@d6 1
a6 1
 *	$Header: tupdesc.h,v 1.3 89/04/12 19:56:54 hirohama Locked $
@


1.3
log
@c.h
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/tupdesc.h,v 1.2 89/03/22 17:34:58 muir Stab $
d9 1
a9 1
#ifndef	TupDescIncluded	/* Include this file only once. */
d17 2
d25 47
@


1.2
log
@copyright removal
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/muir/postgres/src/lib/H/RCS/tupdesc.h,v 1.1 89/01/17 05:55:02 cimarron Exp $
d12 1
d14 1
@


1.1
log
@Initial revision
@
text
@a0 27

; /*
; * 
; * POSTGRES Data Base Management System
; * 
; * Copyright (c) 1988 Regents of the University of California
; * 
; * Permission to use, copy, modify, and distribute this software and its
; * documentation for educational, research, and non-profit purposes and
; * without fee is hereby granted, provided that the above copyright
; * notice appear in all copies and that both that copyright notice and
; * this permission notice appear in supporting documentation, and that
; * the name of the University of California not be used in advertising
; * or publicity pertaining to distribution of the software without
; * specific, written prior permission.  Permission to incorporate this
; * software into commercial products can be obtained from the Campus
; * Software Office, 295 Evans Hall, University of California, Berkeley,
; * Ca., 94720 provided only that the the requestor give the University
; * of California a free licence to any derived software for educational
; * and research purposes.  The University of California makes no
; * representations about the suitability of this software for any
; * purpose.  It is provided "as is" without express or implied warranty.
; * 
; */



d6 1
a6 1
 *	$Header: tupdesc.h,v 1.1 88/11/11 16:37:29 postgres Exp $
@
