Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed serious bug in handling NUMERIC values (proper copy of the data).

  • Loading branch information...
commit ef3f1b2fa1c373a943105428ddb4d65cf3430f93 1 parent 30cc987
@tvondra authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/trimmed.c
View
3  src/trimmed.c
@@ -27,6 +27,7 @@
#include <unistd.h>
#include "postgres.h"
+#include "utils/datum.h"
#include "utils/palloc.h"
#include "utils/array.h"
#include "utils/lsyscache.h"
@@ -412,7 +413,7 @@ trimmed_append_numeric(PG_FUNCTION_ARGS)
data->nelements = data->nelements + SLICE_SIZE;
}
- data->elements[data->next++] = element;
+ data->elements[data->next++] = DatumGetNumeric(datumCopy(NumericGetDatum(element), false, -1));
}

0 comments on commit ef3f1b2

Please sign in to comment.
Something went wrong with that request. Please try again.