Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 375e8a0

Browse files
author
Nikita Glukhov
committed
Add jsonpath support for double type
1 parent ad16a76 commit 375e8a0

File tree

10 files changed

+382
-88
lines changed

10 files changed

+382
-88
lines changed

src/backend/executor/execExprInterp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4350,6 +4350,11 @@ ExecPrepareJsonItemCoercion(JsonItem *item, bool is_jsonb,
43504350
res = JsonItemNumericDatum(item);
43514351
break;
43524352

4353+
case jsiDouble:
4354+
coercion = &coercions->dbl;
4355+
res = JsonItemDoubleDatum(item);
4356+
break;
4357+
43534358
case jbvBool:
43544359
coercion = &coercions->boolean;
43554360
res = JsonItemBool(item);

src/backend/parser/parse_expr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4754,6 +4754,7 @@ initJsonItemCoercions(ParseState *pstate, JsonItemCoercions *coercions,
47544754
{ &coercions->null, UNKNOWNOID },
47554755
{ &coercions->string, TEXTOID },
47564756
{ &coercions->numeric, NUMERICOID },
4757+
{ &coercions->dbl, FLOAT8OID },
47574758
{ &coercions->boolean, BOOLOID },
47584759
{ &coercions->date, DATEOID },
47594760
{ &coercions->time, TIMEOID },

0 commit comments

Comments
 (0)