> On Oct 25, 2023, at 17:21, Pól Ua Laoínecháin <lineh...@tcd.ie> wrote:
> 
> SELECT (ts, te)::TSTZRANGE FROM test;

That syntax doesn't mean what you probably think it does.  (ts, te) defines a 
record type with two fields.  PostgreSQL constructs that, and then attempts to 
apply the cast.  There's no conversion path from that to TSTZRANGE, so the 
system complains.  It's imaginable, I guess, that such a path could be added, 
but the right way to do it is what you do here:

> SELECT TSTZRANGE(ts, te) FROM test;




Reply via email to