File tree Expand file tree Collapse file tree 6 files changed +47
-25
lines changed Expand file tree Collapse file tree 6 files changed +47
-25
lines changed Original file line number Diff line number Diff line change 33 */
44#include "postgres.h"
55
6- #include "btree_gist .h"
6+ #include "utils/builtins .h"
77
88PG_MODULE_MAGIC ;
99
@@ -19,22 +19,26 @@ PG_FUNCTION_INFO_V1(gbtreekey_out);
1919Datum
2020gbtreekey_in (PG_FUNCTION_ARGS )
2121{
22+ Oid typioparam = PG_GETARG_OID (1 );
23+
2224 ereport (ERROR ,
2325 (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 ))));
2529
26- PG_RETURN_POINTER ( NULL );
30+ PG_RETURN_VOID (); /* keep compiler quiet */
2731}
2832
29- #include "btree_utils_var.h"
30- #include "utils/builtins.h"
3133Datum
3234gbtreekey_out (PG_FUNCTION_ARGS )
3335{
36+ /* Sadly, we do not receive any indication of the specific type */
3437 ereport (ERROR ,
3538 (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 */
3842}
3943
4044
Original file line number Diff line number Diff line change @@ -96,15 +96,21 @@ PG_FUNCTION_INFO_V1(ghstore_out);
9696Datum
9797ghstore_in (PG_FUNCTION_ARGS )
9898{
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 */
101104}
102105
103106Datum
104107ghstore_out (PG_FUNCTION_ARGS )
105108{
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 */
108114}
109115
110116static GISTTYPE *
Original file line number Diff line number Diff line change @@ -32,17 +32,19 @@ _intbig_in(PG_FUNCTION_ARGS)
3232{
3333 ereport (ERROR ,
3434 (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 */
3738}
3839
3940Datum
4041_intbig_out (PG_FUNCTION_ARGS )
4142{
4243 ereport (ERROR ,
4344 (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 */
4648}
4749
4850static GISTTYPE *
Original file line number Diff line number Diff line change @@ -23,17 +23,19 @@ ltree_gist_in(PG_FUNCTION_ARGS)
2323{
2424 ereport (ERROR ,
2525 (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 */
2829}
2930
3031Datum
3132ltree_gist_out (PG_FUNCTION_ARGS )
3233{
3334 ereport (ERROR ,
3435 (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 */
3739}
3840
3941ltree_gist *
Original file line number Diff line number Diff line change @@ -55,15 +55,21 @@ PG_FUNCTION_INFO_V1(gtrgm_options);
5555Datum
5656gtrgm_in (PG_FUNCTION_ARGS )
5757{
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 */
6063}
6164
6265Datum
6366gtrgm_out (PG_FUNCTION_ARGS )
6467{
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 */
6773}
6874
6975static TRGM *
Original file line number Diff line number Diff line change @@ -87,10 +87,12 @@ static int32 sizebitvec(BITVECP sign, int siglen);
8787Datum
8888gtsvectorin (PG_FUNCTION_ARGS )
8989{
90+ /* There's no need to support input of gtsvectors */
9091 ereport (ERROR ,
9192 (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 */
9496}
9597
9698#define SINGOUTSTR "%d true bits, %d false bits"
You can’t perform that action at this time.
0 commit comments