Range Types - symmetric - Mailing list pgsql-hackers

From Erik Rijkers
Subject Range Types - symmetric
Date
Msg-id 8eece6ec9500b1d4382f06f07dcedd7f.squirrel@webmail.xs4all.nl
Whole thread Raw
Responses Re: Range Types - symmetric
List pgsql-hackers
Hi,

Just a thought:

select int4range(5,2);
ERROR:  range lower bound must be less than or equal to range upper bound

Of course, I won't argue this is a bug, but I was wondering if it wouldn't be handy to allow a
'symmetric' mode in range construction, where, if the first of the pair is higher than the second,
they are automatically swapped, similar to SYMMETRIC in the BETWEEN clause.

Admittedly, I don't have a specific 'use case' -- it might just often prevent 'manual' swapping
before range construction calls.

Thanks,

Erik Rijkers





pgsql-hackers by date:

Previous
From: panam
Date:
Subject: Re: fix for pg_upgrade
Next
From: Simon Riggs
Date:
Subject: Re: unite recovery.conf and postgresql.conf