Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite730718

Browse files
committed
Use the macro, not handwritten code, to construct anymultirange_in().
Apparently anymultirange_in was written before we converted allthese pseudotype input functions to use a common macro, and it didn'tget fixed before committing. Sloppy merging probably explains itsunintuitive ordering, too, so rearrange.Noted while surveying datatype input functions to see what wehave left to fix. I'm inclined to leave the pseudotypes asthrowing hard errors, because it's difficult to see a reason whyanyone would need something else. But in any case, if we wantto change that, we shouldn't have to change multiple copies ofthe code.
1 parent94985c2 commite730718

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
returnmultirange_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 allowthis, since multirange_out will in fact work.
247+
* We may as well allowoutput, 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
returnmultirange_out(fcinfo);
266255
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp