|
8 | 8 | * ------------------------------------------------------------------------ |
9 | 9 | */ |
10 | 10 |
|
11 | | -#include "pathman.h" |
12 | 11 | #include "init.h" |
13 | | -#include "utils.h" |
| 12 | +#include "pathman.h" |
14 | 13 | #include "relation_info.h" |
| 14 | +#include "utils.h" |
15 | 15 | #include "xact_handling.h" |
16 | 16 |
|
17 | 17 | #include "access/htup_details.h" |
|
20 | 20 | #include "catalog/indexing.h" |
21 | 21 | #include "commands/sequence.h" |
22 | 22 | #include "miscadmin.h" |
| 23 | +#include "utils/array.h" |
23 | 24 | #include "utils/builtins.h" |
| 25 | +#include <utils/inval.h> |
| 26 | +#include "utils/memutils.h" |
24 | 27 | #include "utils/lsyscache.h" |
25 | 28 | #include "utils/syscache.h" |
26 | 29 | #include "utils/typcache.h" |
27 | | -#include "utils/array.h" |
28 | | -#include "utils/memutils.h" |
29 | | -#include <utils/inval.h> |
30 | 30 |
|
31 | 31 |
|
32 | 32 | /* declarations */ |
@@ -56,33 +56,6 @@ PG_FUNCTION_INFO_V1( lock_partitioned_relation ); |
56 | 56 | PG_FUNCTION_INFO_V1( debug_capture ); |
57 | 57 |
|
58 | 58 |
|
59 | | -/* pathman_range type */ |
60 | | -typedef struct PathmanRange |
61 | | -{ |
62 | | - Oid type_oid; |
63 | | - bool by_val; |
64 | | - RangeEntry range; |
65 | | -} PathmanRange; |
66 | | - |
67 | | -typedef struct PathmanHash |
68 | | -{ |
69 | | - Oid child_oid; |
70 | | - uint32 hash; |
71 | | -} PathmanHash; |
72 | | - |
73 | | -typedef struct PathmanRangeListCtxt |
74 | | -{ |
75 | | - Oid type_oid; |
76 | | - bool by_val; |
77 | | - RangeEntry *ranges; |
78 | | - int nranges; |
79 | | - int pos; |
80 | | -} PathmanRangeListCtxt; |
81 | | - |
82 | | -PG_FUNCTION_INFO_V1( pathman_range_in ); |
83 | | -PG_FUNCTION_INFO_V1( pathman_range_out ); |
84 | | - |
85 | | - |
86 | 59 | static void on_partitions_created_internal(Oid partitioned_table, bool add_callbacks); |
87 | 60 | static void on_partitions_updated_internal(Oid partitioned_table, bool add_callbacks); |
88 | 61 | static void on_partitions_removed_internal(Oid partitioned_table, bool add_callbacks); |
@@ -729,41 +702,6 @@ lock_partitioned_relation(PG_FUNCTION_ARGS) |
729 | 702 | } |
730 | 703 |
|
731 | 704 |
|
732 | | -Datum |
733 | | -pathman_range_in(PG_FUNCTION_ARGS) |
734 | | -{ |
735 | | - elog(ERROR, "Not implemented"); |
736 | | -} |
737 | | - |
738 | | -Datum |
739 | | -pathman_range_out(PG_FUNCTION_ARGS) |
740 | | -{ |
741 | | - PathmanRange *rng = (PathmanRange *) PG_GETARG_POINTER(0); |
742 | | - char *result; |
743 | | - char *left, |
744 | | - *right; |
745 | | - Oid outputfunc; |
746 | | - bool typisvarlena; |
747 | | - |
748 | | - getTypeOutputInfo(rng->type_oid, &outputfunc, &typisvarlena); |
749 | | - |
750 | | - left = OidOutputFunctionCall( |
751 | | - outputfunc, |
752 | | - rng->by_val ? |
753 | | - (Datum) rng->range.min : |
754 | | - PointerGetDatum(&rng->range.min)); |
755 | | - |
756 | | - right = OidOutputFunctionCall( |
757 | | - outputfunc, |
758 | | - rng->by_val ? |
759 | | - (Datum) rng->range.max : |
760 | | - PointerGetDatum(&rng->range.max)); |
761 | | - |
762 | | - result = psprintf("[%s: %s)", left, right); |
763 | | - PG_RETURN_CSTRING(result); |
764 | | -} |
765 | | - |
766 | | - |
767 | 705 | /* |
768 | 706 | * NOTE: used for DEBUG, set breakpoint here. |
769 | 707 | */ |
|
0 commit comments