mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Add Oracle-compatible GREATEST and LEAST functions. Pavel Stehule
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.308 2005/06/22 21:14:29 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.309 2005/06/26 22:05:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1047,6 +1047,21 @@ _copyCoalesceExpr(CoalesceExpr *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyMinMaxExpr
|
||||
*/
|
||||
static MinMaxExpr *
|
||||
_copyMinMaxExpr(MinMaxExpr *from)
|
||||
{
|
||||
MinMaxExpr *newnode = makeNode(MinMaxExpr);
|
||||
|
||||
COPY_SCALAR_FIELD(minmaxtype);
|
||||
COPY_SCALAR_FIELD(op);
|
||||
COPY_NODE_FIELD(args);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/*
|
||||
* _copyNullIfExpr (same as OpExpr)
|
||||
*/
|
||||
@ -2805,6 +2820,9 @@ copyObject(void *from)
|
||||
case T_CoalesceExpr:
|
||||
retval = _copyCoalesceExpr(from);
|
||||
break;
|
||||
case T_MinMaxExpr:
|
||||
retval = _copyMinMaxExpr(from);
|
||||
break;
|
||||
case T_NullIfExpr:
|
||||
retval = _copyNullIfExpr(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user