From bedd04a551c30350ebb8da2aa2596d16053b5d15 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Fri, 4 Dec 1998 15:34:49 +0000 Subject: Implement CASE expression. --- src/include/nodes/parsenodes.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/include/nodes/parsenodes.h') diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index afe6fe43f7..20fc0788bd 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.61 1998/10/22 13:52:24 momjian Exp $ + * $Id: parsenodes.h,v 1.62 1998/12/04 15:34:44 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -713,6 +713,28 @@ typedef struct A_Const TypeName *typename; /* typecast */ } A_Const; +/* + * CaseExpr - a CASE expression + */ +typedef struct CaseExpr +{ + NodeTag type; + Oid casetype; + Node *arg; /* implicit equality comparison argument */ + List *args; /* the arguments (list of WHEN clauses) */ + Node *defresult; /* the default result (ELSE clause) */ +} CaseExpr; + +/* + * CaseWhen - an argument to a CASE expression + */ +typedef struct CaseWhen +{ + NodeTag type; + Node *expr; /* comparison expression */ + Node *result; /* substitution result */ +} CaseWhen; + /* * ColumnDef - column definition (used in various creates) */ @@ -777,7 +799,7 @@ typedef struct ResTarget } ResTarget; /* - * ParamString - used in with clauses + * ParamString - used in WITH clauses */ typedef struct ParamString { @@ -797,7 +819,7 @@ typedef struct RelExpr } RelExpr; /* - * SortGroupBy - for order by clause + * SortGroupBy - for ORDER BY clause */ typedef struct SortGroupBy { @@ -807,7 +829,7 @@ typedef struct SortGroupBy } SortGroupBy; /* - * JoinUsing - for join using clause + * JoinUsing - for JOIN USING clause */ typedef struct JoinUsing { @@ -818,7 +840,7 @@ typedef struct JoinUsing } JoinUsing; /* - * RangeVar - range variable, used in from clauses + * RangeVar - range variable, used in FROM clauses */ typedef struct RangeVar { @@ -828,7 +850,7 @@ typedef struct RangeVar } RangeVar; /* - * IndexElem - index parameters (used in create index) + * IndexElem - index parameters (used in CREATE INDEX) */ typedef struct IndexElem { -- cgit v1.2.1