|
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"
|
@@ -84,6 +85,8 @@ record_in(PG_FUNCTION_ARGS)
|
84 | 85 | bool *nulls;
|
85 | 86 | StringInfoData buf;
|
86 | 87 |
|
| 88 | + check_stack_depth(); /* recurses for record-type columns */ |
| 89 | + |
87 | 90 | /*
|
88 | 91 | * Give a friendly error message if we did not get enough info to identify
|
89 | 92 | * the target record type. (lookup_rowtype_tupdesc would fail anyway, but
|
@@ -307,6 +310,8 @@ record_out(PG_FUNCTION_ARGS)
|
307 | 310 | bool *nulls;
|
308 | 311 | StringInfoData buf;
|
309 | 312 |
|
| 313 | + check_stack_depth(); /* recurses for record-type columns */ |
| 314 | + |
310 | 315 | /* Extract type info from the tuple itself */
|
311 | 316 | tupType = HeapTupleHeaderGetTypeId(rec);
|
312 | 317 | tupTypmod = HeapTupleHeaderGetTypMod(rec);
|
@@ -470,6 +475,8 @@ record_recv(PG_FUNCTION_ARGS)
|
470 | 475 | Datum *values;
|
471 | 476 | bool *nulls;
|
472 | 477 |
|
| 478 | + check_stack_depth(); /* recurses for record-type columns */ |
| 479 | + |
473 | 480 | /*
|
474 | 481 | * Give a friendly error message if we did not get enough info to identify
|
475 | 482 | * the target record type. (lookup_rowtype_tupdesc would fail anyway, but
|
@@ -662,6 +669,8 @@ record_send(PG_FUNCTION_ARGS)
|
662 | 669 | bool *nulls;
|
663 | 670 | StringInfoData buf;
|
664 | 671 |
|
| 672 | + check_stack_depth(); /* recurses for record-type columns */ |
| 673 | + |
665 | 674 | /* Extract type info from the tuple itself */
|
666 | 675 | tupType = HeapTupleHeaderGetTypeId(rec);
|
667 | 676 | tupTypmod = HeapTupleHeaderGetTypMod(rec);
|
@@ -821,6 +830,8 @@ record_cmp(FunctionCallInfo fcinfo)
|
821 | 830 | int i2;
|
822 | 831 | int j;
|
823 | 832 |
|
| 833 | + check_stack_depth(); /* recurses for record-type columns */ |
| 834 | + |
824 | 835 | /* Extract type info from the tuples */
|
825 | 836 | tupType1 = HeapTupleHeaderGetTypeId(record1);
|
826 | 837 | tupTypmod1 = HeapTupleHeaderGetTypMod(record1);
|
@@ -1056,6 +1067,8 @@ record_eq(PG_FUNCTION_ARGS)
|
1056 | 1067 | int i2;
|
1057 | 1068 | int j;
|
1058 | 1069 |
|
| 1070 | + check_stack_depth(); /* recurses for record-type columns */ |
| 1071 | + |
1059 | 1072 | /* Extract type info from the tuples */
|
1060 | 1073 | tupType1 = HeapTupleHeaderGetTypeId(record1);
|
1061 | 1074 | tupTypmod1 = HeapTupleHeaderGetTypMod(record1);
|
|
0 commit comments