Search Postgresql Archives

Re: casting tsrange to tstzrange doesn't seem to work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-06-11 at 14:05 -0700, Joe Van Dyk wrote:
> # select tsrange(null)::tstzrange;
> ERROR:  cannot cast type tsrange to tstzrange
> LINE 1: select tsrange(null)::tstzrange;
> 
I agree that there should be a cast between tsrange and tstzrange.

Unfortunately, this cant work generally for all range types, because the
total order might be different. For instance, we can't cast between a
textrange and int4range, because:

   ['09','1']

is a valid text range, but:

   [9,1]

is not.

Regards,
	Jeff Davis





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux