Re: Problem with CAST-ing - am I missing something?

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Problem with CAST-ing - am I missing something?
Дата
Msg-id 3E465C5A-D794-41B2-B481-DDACC10B41DD@thebuild.com
обсуждение исходный текст
Ответ на Problem with CAST-ing - am I missing something?  (Pól Ua Laoínecháin <linehanp@tcd.ie>)
Ответы Re: Problem with CAST-ing - am I missing something?
Список pgsql-general

> On Oct 25, 2023, at 17:21, Pól Ua Laoínecháin <linehanp@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
constructsthat, 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;





В списке pgsql-general по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: setting up streaming replication, part 2
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Problem with CAST-ing - am I missing something?