File tree 6 files changed +47
-25
lines changed
6 files changed +47
-25
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
#include "postgres.h"
5
5
6
- #include "btree_gist .h"
6
+ #include "utils/builtins .h"
7
7
8
8
PG_MODULE_MAGIC ;
9
9
@@ -19,22 +19,26 @@ PG_FUNCTION_INFO_V1(gbtreekey_out);
19
19
Datum
20
20
gbtreekey_in (PG_FUNCTION_ARGS )
21
21
{
22
+ Oid typioparam = PG_GETARG_OID (1 );
23
+
22
24
ereport (ERROR ,
23
25
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
24
- errmsg ("<datatype>key_in() not implemented" )));
26
+ errmsg ("cannot accept a value of type %s" ,
27
+ format_type_extended (typioparam , -1 ,
28
+ FORMAT_TYPE_ALLOW_INVALID ))));
25
29
26
- PG_RETURN_POINTER ( NULL );
30
+ PG_RETURN_VOID (); /* keep compiler quiet */
27
31
}
28
32
29
- #include "btree_utils_var.h"
30
- #include "utils/builtins.h"
31
33
Datum
32
34
gbtreekey_out (PG_FUNCTION_ARGS )
33
35
{
36
+ /* Sadly, we do not receive any indication of the specific type */
34
37
ereport (ERROR ,
35
38
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
36
- errmsg ("<datatype>key_out() not implemented" )));
37
- PG_RETURN_POINTER (NULL );
39
+ errmsg ("cannot display a value of type %s" , "gbtreekey?" )));
40
+
41
+ PG_RETURN_VOID (); /* keep compiler quiet */
38
42
}
39
43
40
44
Original file line number Diff line number Diff line change @@ -96,15 +96,21 @@ PG_FUNCTION_INFO_V1(ghstore_out);
96
96
Datum
97
97
ghstore_in (PG_FUNCTION_ARGS )
98
98
{
99
- elog (ERROR , "Not implemented" );
100
- PG_RETURN_DATUM (0 );
99
+ ereport (ERROR ,
100
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
101
+ errmsg ("cannot accept a value of type %s" , "ghstore" )));
102
+
103
+ PG_RETURN_VOID (); /* keep compiler quiet */
101
104
}
102
105
103
106
Datum
104
107
ghstore_out (PG_FUNCTION_ARGS )
105
108
{
106
- elog (ERROR , "Not implemented" );
107
- PG_RETURN_DATUM (0 );
109
+ ereport (ERROR ,
110
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
111
+ errmsg ("cannot display a value of type %s" , "ghstore" )));
112
+
113
+ PG_RETURN_VOID (); /* keep compiler quiet */
108
114
}
109
115
110
116
static GISTTYPE *
Original file line number Diff line number Diff line change @@ -32,17 +32,19 @@ _intbig_in(PG_FUNCTION_ARGS)
32
32
{
33
33
ereport (ERROR ,
34
34
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
35
- errmsg ("_intbig_in() not implemented" )));
36
- PG_RETURN_DATUM (0 );
35
+ errmsg ("cannot accept a value of type %s" , "intbig_gkey" )));
36
+
37
+ PG_RETURN_VOID (); /* keep compiler quiet */
37
38
}
38
39
39
40
Datum
40
41
_intbig_out (PG_FUNCTION_ARGS )
41
42
{
42
43
ereport (ERROR ,
43
44
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
44
- errmsg ("_intbig_out() not implemented" )));
45
- PG_RETURN_DATUM (0 );
45
+ errmsg ("cannot display a value of type %s" , "intbig_gkey" )));
46
+
47
+ PG_RETURN_VOID (); /* keep compiler quiet */
46
48
}
47
49
48
50
static GISTTYPE *
Original file line number Diff line number Diff line change @@ -23,17 +23,19 @@ ltree_gist_in(PG_FUNCTION_ARGS)
23
23
{
24
24
ereport (ERROR ,
25
25
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
26
- errmsg ("ltree_gist_in() not implemented" )));
27
- PG_RETURN_DATUM (0 );
26
+ errmsg ("cannot accept a value of type %s" , "ltree_gist" )));
27
+
28
+ PG_RETURN_VOID (); /* keep compiler quiet */
28
29
}
29
30
30
31
Datum
31
32
ltree_gist_out (PG_FUNCTION_ARGS )
32
33
{
33
34
ereport (ERROR ,
34
35
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
35
- errmsg ("ltree_gist_out() not implemented" )));
36
- PG_RETURN_DATUM (0 );
36
+ errmsg ("cannot display a value of type %s" , "ltree_gist" )));
37
+
38
+ PG_RETURN_VOID (); /* keep compiler quiet */
37
39
}
38
40
39
41
ltree_gist *
Original file line number Diff line number Diff line change @@ -55,15 +55,21 @@ PG_FUNCTION_INFO_V1(gtrgm_options);
55
55
Datum
56
56
gtrgm_in (PG_FUNCTION_ARGS )
57
57
{
58
- elog (ERROR , "not implemented" );
59
- PG_RETURN_DATUM (0 );
58
+ ereport (ERROR ,
59
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
60
+ errmsg ("cannot accept a value of type %s" , "gtrgm" )));
61
+
62
+ PG_RETURN_VOID (); /* keep compiler quiet */
60
63
}
61
64
62
65
Datum
63
66
gtrgm_out (PG_FUNCTION_ARGS )
64
67
{
65
- elog (ERROR , "not implemented" );
66
- PG_RETURN_DATUM (0 );
68
+ ereport (ERROR ,
69
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
70
+ errmsg ("cannot display a value of type %s" , "gtrgm" )));
71
+
72
+ PG_RETURN_VOID (); /* keep compiler quiet */
67
73
}
68
74
69
75
static TRGM *
Original file line number Diff line number Diff line change @@ -87,10 +87,12 @@ static int32 sizebitvec(BITVECP sign, int siglen);
87
87
Datum
88
88
gtsvectorin (PG_FUNCTION_ARGS )
89
89
{
90
+ /* There's no need to support input of gtsvectors */
90
91
ereport (ERROR ,
91
92
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
92
- errmsg ("gtsvector_in not implemented" )));
93
- PG_RETURN_DATUM (0 );
93
+ errmsg ("cannot accept a value of type %s" , "gtsvector" )));
94
+
95
+ PG_RETURN_VOID (); /* keep compiler quiet */
94
96
}
95
97
96
98
#define SINGOUTSTR "%d true bits, %d false bits"
You can’t perform that action at this time.
0 commit comments