It looks like you are using now() fairly often in that query. That would, of course, give different results in different transactions, but it could also give different results if a) the things you are comparing now() to are timestamp without time zone and b) the session time zone of the user doing the refresh is different from the session time zone of the user running the query. I'd also be suspicious about any other timestamp comparisons that aren't comparing timestamp to timestamp or timestamptz to timestamptz.
- Different results from identical matviews Anders Steinlein
- Re: Different results from identical matviews Tom Lane
- Re: Different results from identical matviews Magnus Hagander
- Re: Different results from identical matvie... Anders Steinlein
- Re: Different results from identical matviews Anders Steinlein
- Re: Different results from identical matvie... Anders Steinlein
- Re: Different results from identical ma... Michael Lewis
- Re: Different results from identic... Paul Förster
- Re: Different results from identical ma... Jeremy Smith
- Re: Different results from identic... Anders Steinlein
- Re: Different results from identical ma... David G. Johnston
- Re: Different results from identic... Anders Steinlein
- Re: Different results from ide... David G. Johnston
- Re: Different results from identical matvie... Tom Lane
- Re: Different results from identical ma... Anders Steinlein
- Re: Different results from identic... Tom Lane
- Re: Different results from ide... David G. Johnston
- Re: Different results from ide... Anders Steinlein
- Re: Different results from... Tom Lane