Open weibiansanjue opened 1 year ago
test case use quotes, success
/** int4range **/
select '[400,500]'::"int4range";
select null::"int4range";
select "int4range"(null);
select 'empty'::"int4range";
select "int4range"('empty');
select "int4range"('[400,500]');
select "int4range"(400, 500, '[]');
/** int8range — bigint的范围 **/
select '[400000000000,500000000000]'::"int8range";
select null::"int8range";
select "int8range"(null);
select 'empty'::"int8range";
select "int8range"('empty');
select "int8range"('[400000000000,500000000000]');
select "int8range"(400000000000, 500000000000, '[]');
/** numrange **/
select '[11.11, 22.22]'::"numrange";
select null::"numrange";
select "numrange"(null);
select 'empty'::"numrange";
select "numrange"('empty');
select "numrange"('[11.11, 22.22]');
select "numrange"(11.11, 22.22, '[]');
/** tsrange **/
select '[2023-01-01 14:30, 2023-03-01 15:30]'::"tsrange";
select null::"tsrange";
select "tsrange"(null);
select 'empty'::"tsrange";
select "tsrange"('empty');
select "tsrange"('[2023-01-01 14:30, 2023-03-01 15:30]');
select "tsrange"(now()::timestamp(0)without time zone, now()::timestamp(0)without time zone, '[]');
/** tstzrange **/
select '[2023-01-01 14:30, 2023-03-01 15:30]'::"tstzrange";
select null::"tstzrange";
select "tstzrange"(null);
select 'empty'::"tstzrange";
select "tstzrange"('empty');
select "tstzrange"(now(), now(), '[]');
/** daterange **/
select '[2023-01-01, 2023-03-31)'::"daterange";
select null::"daterange";
select "daterange"(null);
select 'empty'::"daterange";
select "daterange"('empty');
select "daterange"('2023-01-01', '2023-03-31', '[]');
select "daterange"(current_date-1, current_date, '[]');
Hi @weibiansanjue Thanks for your feedback, are you interested in submitting a PR to improve it?
Hi @weibiansanjue Thanks for your feedback, are you interested in submitting a PR to improve it?
Hi @RaigorJiang, I'm sorry, I find this question, but I'm not capable of solving this problem for the time being. if you have time, could you please help me? thanks a lot.
Ok, I'll mark it as volunteer wanted
, see if anyone is interested.
Question
env
mini case
select public.int4range(400, 500, '[]');
Other range type construcor function is same too.(int8range, numrange, tsrange, tstzrange, daterange)
other function don't wrapped in quotes is success
solution
question
suppose
other test
Thanks a lot.