Skip to content

Commit e730718

Browse files
committed
Use the macro, not handwritten code, to construct anymultirange_in().
Apparently anymultirange_in was written before we converted all these pseudotype input functions to use a common macro, and it didn't get fixed before committing. Sloppy merging probably explains its unintuitive ordering, too, so rearrange. Noted while surveying datatype input functions to see what we have left to fix. I'm inclined to leave the pseudotypes as throwing hard errors, because it's difficult to see a reason why anyone would need something else. But in any case, if we want to change that, we shouldn't have to change multiple copies of the code.
1 parent 94985c2 commit e730718

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

src/backend/utils/adt/pseudotypes.c

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -229,38 +229,27 @@ anycompatiblerange_out(PG_FUNCTION_ARGS)
229229
}
230230

231231
/*
232-
* anycompatiblemultirange
232+
* anymultirange
233233
*
234234
* We may as well allow output, since multirange_out will in fact work.
235235
*/
236-
PSEUDOTYPE_DUMMY_INPUT_FUNC(anycompatiblemultirange);
236+
PSEUDOTYPE_DUMMY_INPUT_FUNC(anymultirange);
237237

238238
Datum
239-
anycompatiblemultirange_out(PG_FUNCTION_ARGS)
239+
anymultirange_out(PG_FUNCTION_ARGS)
240240
{
241241
return multirange_out(fcinfo);
242242
}
243243

244244
/*
245-
* anymultirange_in - input routine for pseudo-type ANYMULTIRANGE.
246-
*/
247-
Datum
248-
anymultirange_in(PG_FUNCTION_ARGS)
249-
{
250-
ereport(ERROR,
251-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
252-
errmsg("cannot accept a value of type %s", "anymultirange")));
253-
254-
PG_RETURN_VOID(); /* keep compiler quiet */
255-
}
256-
257-
/*
258-
* anymultirange_out - output routine for pseudo-type ANYMULTIRANGE.
245+
* anycompatiblemultirange
259246
*
260-
* We may as well allow this, since multirange_out will in fact work.
247+
* We may as well allow output, since multirange_out will in fact work.
261248
*/
249+
PSEUDOTYPE_DUMMY_INPUT_FUNC(anycompatiblemultirange);
250+
262251
Datum
263-
anymultirange_out(PG_FUNCTION_ARGS)
252+
anycompatiblemultirange_out(PG_FUNCTION_ARGS)
264253
{
265254
return multirange_out(fcinfo);
266255
}

0 commit comments

Comments
 (0)