Range Types - symmetric

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Range Types - symmetric
Date: 2011-09-13 16:08:14
Message-ID: 8eece6ec9500b1d4382f06f07dcedd7f.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-09-13 16:10:30 Re: unite recovery.conf and postgresql.conf
Previous Message PostgreSQL - Hans-Jürgen Schönig 2011-09-13 15:43:20 WIP: cross column stats revisited ...