1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +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/parser/parse_oper.c,v 1.21 1998/11/27 19:52:14 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.22 1998/12/08 06:18:57 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -210,6 +210,7 @@ oper_select_candidate(int nargs,
nmatch++;
}
/* take this one as the best choice so far? */
if ((nmatch > nbestMatch) || (last_candidate == NULL))
{
nbestMatch = nmatch;
@ -217,12 +218,14 @@ oper_select_candidate(int nargs,
last_candidate = current_candidate;
ncandidates = 1;
}
/* no worse than the last choice, so keep this one too? */
else if (nmatch == nbestMatch)
{
last_candidate->next = current_candidate;
last_candidate = current_candidate;
ncandidates++;
}
/* otherwise, don't bother keeping this one... */
else
{
last_candidate->next = NULL;