1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-16 15:02:33 +03:00

Add Oracle-compatible GREATEST and LEAST functions. Pavel Stehule

This commit is contained in:
Tom Lane
2005-06-26 22:05:42 +00:00
parent d395aecffa
commit 943b396245
17 changed files with 409 additions and 36 deletions

View File

@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.107 2005/04/06 16:34:07 tgl Exp $
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.108 2005/06/26 22:05:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -657,6 +657,23 @@ typedef struct CoalesceExpr
List *args; /* the arguments */
} CoalesceExpr;
/*
* MinMaxExpr - a GREATEST or LEAST function
*/
typedef enum MinMaxOp
{
IS_GREATEST,
IS_LEAST
} MinMaxOp;
typedef struct MinMaxExpr
{
Expr xpr;
Oid minmaxtype; /* common type of arguments and result */
MinMaxOp op; /* function to execute */
List *args; /* the arguments */
} MinMaxExpr;
/*
* NullIfExpr - a NULLIF expression
*