Re: Different results from identical matviews

Поиск
Список
Период
Сортировка
Искать
От
Paul Förster
Тема
Re: Different results from identical matviews
Дата
Msg-id
2553D145-15CC-4A52-A8B9-850A1650F8F7@gmail.com
Ответ на
Список
Дерево обсуждения
Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Tom Lane <tgl@sss.pgh.pa.us>
Re: Different results from identical matviews Magnus Hagander <magnus@hagander.net>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Tom Lane <tgl@sss.pgh.pa.us>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Tom Lane <tgl@sss.pgh.pa.us>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Tom Lane <tgl@sss.pgh.pa.us>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Tom Lane <tgl@sss.pgh.pa.us>
Re: Different results from identical matviews "David G. Johnston" <david.g.johnston@gmail.com>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews Michael Lewis <mlewis@entrata.com>
Re: Different results from identical matviews Paul Förster <paul.foerster@gmail.com>
Re: Different results from identical matviews "David G. Johnston" <david.g.johnston@gmail.com>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Re: Different results from identical matviews "David G. Johnston" <david.g.johnston@gmail.com>
Re: Different results from identical matviews Jeremy Smith <jeremy@musicsmith.net>
Re: Different results from identical matviews Anders Steinlein <anders@e5r.no>
Hi Michael,

> On 02. Jul, 2020, at 14:55, Michael Lewis  wrote:
> 
> Is now() computed at the time the view is defined and not at refresh? If this were a function, I would be more suspicious of that but a plain view, surely not. I hope.

now() returns the time at the beginning of the transaction:

see: https://www.postgresql.org/docs/current/functions-datetime.html

If you want the time whenever you call the function, use clock_timestamp() instead. There's also a good article at:

https://www.cybertec-postgresql.com/en/postgresql-now-vs-nowtimestamp-vs-clock_timestamp/

Hope this helps.

Cheers,
Paul

В списке pgsql-general по дате отправления
От: Anders Steinlein
Дата:
От: Tom Lane
Дата:
FAQ