Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0la-0000IG-I2 for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 16:01:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga0lZ-0005E2-3x for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 16:01:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0lX-00056B-0I for pgsql-general@lists.postgresql.org; Thu, 20 Dec 2018 16:01:40 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0lQ-0001pv-ST for pgsql-general@lists.postgresql.org; Thu, 20 Dec 2018 16:01:37 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 610C32234C; Thu, 20 Dec 2018 11:01:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 20 Dec 2018 11:01:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=v bdR7ykwY7YEc/qXrNcCjK0/y5SyNndSbCcmhJl9ky8=; b=ix0QtGkpXG4IKn44w EGuO7Pp9VdYn6TGSkltMfOF8K7EN8kf/C2hp3NfYomcHVj0t8mP1ShUf+kIMu2UU 5vt9Nhk4V7lgjuCf8BV7WkVWIObFT2rP6Uj9vXUj0eLi6MVWmDOdkbNcHTzfO2xr RLEXNSxGeILyYWnd6WpvRuTyPqp+Kv8jICGAScbIMvJkMX2wTTtVGgXD0pITBIDk ACmDIFmOYIR5SYPOQAT82Y4b05hxyeIHhrfIBUyZs5zm8XmFhS6flIPJBKzrS3M9 YOX5fomE6pCgL+GxtHCGVVZNB3aH6lfYi6e0WRz0eEDR1CApb1r7AvK4o0mxBYvv 8j8pA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=vbdR7ykwY7YEc/qXrNcCjK0/y5SyNndSbCcmhJl9k y8=; b=aWN7ac+eHHMJp4o5vsGu1LZDFdWdKCq1ADLm72svitaMVYAOycxiMbfj6 fRGTvcSZeNryA/yN46vySiKRfEslvhvl8v1FyjDVHHIrCDVRZ6lgZ6SgFeLwRXFF uXSI1KdrVFspyo2oJHzfp3TKtRjolcNZ1pc4Bu802eqKtqRbAhV8/ikDAyind9Vu Jld3Dhz3YRE9IWrqOFb6mlUTu2fKUF0YOa1N5s10cai3hu59Y0HhIcLX3bS+qsuz 92kynZ22knUpD9ZqCUWHHxoJekPS216C7aYdVO24TPv5ggMlWydxLfTrgANeRmM/ lS18xi8uPyMeodAI+hxecBsSDXbwA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudejfedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomh eptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghv vghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppe ejuddrvdduvddrudefgedrfeenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghn rdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id D7E85E4665; Thu, 20 Dec 2018 11:01:24 -0500 (EST) Subject: Re: Watching for view changes To: Mitar , Ron Cc: pgsql-general@lists.postgresql.org References: <8ce68eb6-4bae-447c-b9d2-f25e0c02546d@gmail.com> From: Adrian Klaver Message-ID: <24cae5b1-fbc6-0cb4-e10c-6cd316dff2f5@aklaver.com> Date: Thu, 20 Dec 2018 08:01:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/20/18 7:54 AM, Mitar wrote: > Hi! > > Thanks. Care for a link or at least thread subject? https://www.postgresql.org/message-id/CA%2BFnnTxqScf6mDw_7HLMfu7YTagPrsYUw-bc%3DOKsBQ0TqprvEA%40mail.gmail.com > > Also, Googling around this seems a pretty popular request. I am quite > surprised that there is not something out-of-box available for this, > efficient and scalable. > > > Mitar > > On Thu, Dec 20, 2018 at 7:33 AM Ron wrote: >> >> On 12/20/18 3:17 AM, Mitar wrote: >>> Hi! >>> >>> I am trying to see how I could use NOTIFY/LISTEN to watch changes of a >>> complicated SELECT query which spans multiple tables. Ideally, I would >>> like to leave to PostgreSQL to determine when some data (and which >>> data) in the result of the SELECT query has changed. So I am thinking >> [snip] >> >> There was a LONG thread on this list a few months ago about monitoring for >> DDL changes. It should prove helpful (or cause you to despair). >> >> >> -- >> Angular momentum makes the world go 'round. >> > > -- Adrian Klaver adrian.klaver@aklaver.com