1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +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

@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.245 2005/06/22 21:14:29 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.246 2005/06/26 22:05:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -450,6 +450,16 @@ _equalCoalesceExpr(CoalesceExpr *a, CoalesceExpr *b)
return true;
}
static bool
_equalMinMaxExpr(MinMaxExpr *a, MinMaxExpr *b)
{
COMPARE_SCALAR_FIELD(minmaxtype);
COMPARE_SCALAR_FIELD(op);
COMPARE_NODE_FIELD(args);
return true;
}
static bool
_equalNullIfExpr(NullIfExpr *a, NullIfExpr *b)
{
@@ -1868,6 +1878,9 @@ equal(void *a, void *b)
case T_CoalesceExpr:
retval = _equalCoalesceExpr(a, b);
break;
case T_MinMaxExpr:
retval = _equalMinMaxExpr(a, b);
break;
case T_NullIfExpr:
retval = _equalNullIfExpr(a, b);
break;