|
19 | 19 | #include "catalog/pg_type.h"
|
20 | 20 | #include "funcapi.h"
|
21 | 21 | #include "libpq/pqformat.h"
|
| 22 | +#include "miscadmin.h" |
22 | 23 | #include "utils/builtins.h"
|
23 | 24 | #include "utils/lsyscache.h"
|
24 | 25 | #include "utils/typcache.h"
|
@@ -88,6 +89,8 @@ record_in(PG_FUNCTION_ARGS)
|
88 | 89 | bool *nulls;
|
89 | 90 | StringInfoData buf;
|
90 | 91 |
|
| 92 | + check_stack_depth(); /* recurses for record-type columns */ |
| 93 | + |
91 | 94 | /*
|
92 | 95 | * Use the passed type unless it's RECORD; we can't support input of
|
93 | 96 | * anonymous types, mainly because there's no good way to figure out which
|
@@ -310,6 +313,8 @@ record_out(PG_FUNCTION_ARGS)
|
310 | 313 | bool *nulls;
|
311 | 314 | StringInfoData buf;
|
312 | 315 |
|
| 316 | + check_stack_depth(); /* recurses for record-type columns */ |
| 317 | + |
313 | 318 | /* Extract type info from the tuple itself */
|
314 | 319 | tupType = HeapTupleHeaderGetTypeId(rec);
|
315 | 320 | tupTypmod = HeapTupleHeaderGetTypMod(rec);
|
@@ -477,6 +482,8 @@ record_recv(PG_FUNCTION_ARGS)
|
477 | 482 | Datum *values;
|
478 | 483 | bool *nulls;
|
479 | 484 |
|
| 485 | + check_stack_depth(); /* recurses for record-type columns */ |
| 486 | + |
480 | 487 | /*
|
481 | 488 | * Use the passed type unless it's RECORD; we can't support input of
|
482 | 489 | * anonymous types, mainly because there's no good way to figure out which
|
@@ -667,6 +674,8 @@ record_send(PG_FUNCTION_ARGS)
|
667 | 674 | bool *nulls;
|
668 | 675 | StringInfoData buf;
|
669 | 676 |
|
| 677 | + check_stack_depth(); /* recurses for record-type columns */ |
| 678 | + |
670 | 679 | /* Extract type info from the tuple itself */
|
671 | 680 | tupType = HeapTupleHeaderGetTypeId(rec);
|
672 | 681 | tupTypmod = HeapTupleHeaderGetTypMod(rec);
|
@@ -826,6 +835,8 @@ record_cmp(FunctionCallInfo fcinfo)
|
826 | 835 | int i2;
|
827 | 836 | int j;
|
828 | 837 |
|
| 838 | + check_stack_depth(); /* recurses for record-type columns */ |
| 839 | + |
829 | 840 | /* Extract type info from the tuples */
|
830 | 841 | tupType1 = HeapTupleHeaderGetTypeId(record1);
|
831 | 842 | tupTypmod1 = HeapTupleHeaderGetTypMod(record1);
|
@@ -1052,6 +1063,8 @@ record_eq(PG_FUNCTION_ARGS)
|
1052 | 1063 | int i2;
|
1053 | 1064 | int j;
|
1054 | 1065 |
|
| 1066 | + check_stack_depth(); /* recurses for record-type columns */ |
| 1067 | + |
1055 | 1068 | /* Extract type info from the tuples */
|
1056 | 1069 | tupType1 = HeapTupleHeaderGetTypeId(record1);
|
1057 | 1070 | tupTypmod1 = HeapTupleHeaderGetTypMod(record1);
|
|
0 commit comments