Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqz2U-0001e1-0L for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 13:14:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqz2S-0003fu-0R for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 13:14:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqz2R-0003fQ-PJ for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 13:14:03 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jqz2P-0006gD-MR for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 13:14:02 +0000 Received: by mail-ej1-x644.google.com with SMTP id a1so29471176ejg.12 for ; Thu, 02 Jul 2020 06:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6foRw+O8MS9btzHcPiUZdwz+Oo/61XdBmE03d0o/mdE=; b=cgihb0yNIozRHiS+8Fcp0KcoiVAyLhAU4/BGwvXi06aLgFc1yKnPqG4/XDeo57qiV+ q6hAzqOZAVm2kUcs0IZtU6ln659GZeHO9hNtYuljGht7Z4j12GNeer3i393ROsbWBoQt kHAgw4uROvxSZHIAGK7VMRqykg5j0XIu75c94SxOLaHj+sphPvYR6trZjM8ETF5GED9B GX+vv0Ni0UCk1C8prIIlTZnFHoMhZ++MlkzVgFX+KJbl68BlFW9d/Ix66/snrRmbs8dZ W80ABYZAoB5RiZZWONUQWfgUcJUmsPbvq5DQAQ4GUBJneCdbdO7Pb/jjgBPdjTpa1KJj sTag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6foRw+O8MS9btzHcPiUZdwz+Oo/61XdBmE03d0o/mdE=; b=NOlOn+4u6DbBmXrfOdCef8lY9xN7FSg+254ds7lecJMlZhgEfJ/g48hMThlHRAGNyC fxD43zNXjCc00cZX2mtzTH0EqCy39OBJqP5eqfQiM0ns22n5YXPN/x0v27uGaaJ35xE+ 6kTGMFDQrSS8J/PmMCWzFNo33L/rtYeh5VDXZc8K+fJSO/X7Miy4Qikomo03+LewxFbE 9+o3HWzar6HqsVwnmgBdLCRxC+sMsSpKQRwJRueI9cxfeRYnR8d/Rxi/FAb617CY2+/T nN+pFNs7HDzhWms71sedR0QEGSFIm5KHKJmpU05myNUWaApptERCZpDB0AkriSX2Vtlj pnmQ== X-Gm-Message-State: AOAM533RGpTjem288uIxxvm5u83MPq+bHJnJ3m45iGOEj6SFpfKz/dbi 3FSdAm6PKN7qRj8pT3oS8WjEtHai X-Google-Smtp-Source: ABdhPJy0HPpRqp8KNS0UwVkRPimNJwfKkyRbOPG+lrhCfh2iEkSaUJTb9QmEz6TLEX9l3W+N+M2NZg== X-Received: by 2002:a17:906:9348:: with SMTP id p8mr3694492ejw.467.1593695295294; Thu, 02 Jul 2020 06:08:15 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id f17sm6743591ejr.71.2020.07.02.06.08.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2020 06:08:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Different results from identical matviews From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: Date: Thu, 2 Jul 2020 15:08:12 +0200 Cc: Anders Steinlein , Tom Lane , pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <2553D145-15CC-4A52-A8B9-850A1650F8F7@gmail.com> References: <815598.1593648137@sss.pgh.pa.us> To: Michael Lewis X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Michael, > On 02. Jul, 2020, at 14:55, Michael Lewis wrote: >=20 > 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-c= lock_timestamp/ Hope this helps. Cheers, Paul=