1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Define routines and catalog entries for string min()/max() functions.

Extend new type coersion techniques to aggregates.
Clean up a few elog() messages.
This commit is contained in:
Thomas G. Lockhart
1998-12-08 06:19:15 +00:00
parent 9470ab03c9
commit 53b476798a
4 changed files with 194 additions and 16 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.44 1998/10/08 18:30:12 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.45 1998/12/08 06:19:15 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -577,6 +577,38 @@ text_ge(text *arg1, text *arg2)
return (bool) !text_lt(arg1, arg2);
}
text *
text_larger(text *arg1, text *arg2)
{
text *result;
text *temp;
temp = ((text_cmp(arg1, arg2) <= 0)? arg2: arg1);
/* Make a copy */
result = (text *) palloc(VARSIZE(temp));
memmove((char *) result, (char *) temp, VARSIZE(temp));
return (result);
}
text *
text_smaller(text *arg1, text *arg2)
{
text *result;
text *temp;
temp = ((text_cmp(arg1, arg2) > 0)? arg2: arg1);
/* Make a copy */
result = (text *) palloc(VARSIZE(temp));
memmove((char *) result, (char *) temp, VARSIZE(temp));
return (result);
}
/*-------------------------------------------------------------
* byteaGetSize
*