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 1ga0Jw-00079u-Th for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 15:33:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga0Jv-0007Ee-Js for pgsql-general@arkaria.postgresql.org; Thu, 20 Dec 2018 15:33:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0Jv-0007EQ-8Q for pgsql-general@lists.postgresql.org; Thu, 20 Dec 2018 15:33:07 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0Jr-0005rr-Sb for pgsql-general@lists.postgresql.org; Thu, 20 Dec 2018 15:33:06 +0000 Received: by mail-ot1-x334.google.com with SMTP id w25so2233147otm.13 for ; Thu, 20 Dec 2018 07:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=lbvCkTiwrE7oRpsGtw0UsFAWd0mMFmwTufLdlAyUJkE=; b=dNsNj5XH3uwpDmZRDLM63vnVCQ6uZRgIuqwEGNvpz1TAlabI8RC0o31kTy1fVgQSLj nQdiqifi4lb9cXso3D3QzTvu62h7kCYJNmr9Cp1Va9X6vY4FMZt5VYAUMCc/wQJvRFMW yyuLjSP3yHFhbodILDTVEEM3LEykewCsu0x6stXIWcx0wntAYuj+KAjQcEFgNy0bBLTj fGSTXJU7fuD4NYElphLIE5INR1dbN5hl7kLR1PmTupwUpJlRQyFE80YpYUOpC5WPIDtd WbhnOkR+rYfwadyDq76HMx15hCi8ZQNc6UqSJ1WSYRTajxz38vPe0vDxXL0ucSMnjVw4 iShA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=lbvCkTiwrE7oRpsGtw0UsFAWd0mMFmwTufLdlAyUJkE=; b=Ui9LPjIFxOTkVOA/LqPZkxAUfwJ5vG14zFJbRrLkUh1KdgO2Ny+kGHjWUw1cacaUD3 itVXo9s8HKyqV3f+UvrOWwFK6Fi0fKX8uEoRk/AlKNar9YsR+6DG4r+427gFW3eXsSOJ t+ORMe25ylBvkz7aQD7Ep5ooN5qewPnGJmyu9paQ3pHW8DhWuS1WqxNV5jzxi/yueI0K kMNAEDEKOA63itgVw4XU+gtXm8X1mF1Qk339/pPl+TwmhszfSIFwxaisOkhIvicqPeHq etIGNzTZwtkW9z6uVJ3vTdnFxw5b5BBbLs5BuI3BZi9W1LuZH3NszXuUiAIWgxucE+Z9 YOTg== X-Gm-Message-State: AA+aEWYbSNgAFTOq4w971uLBodxPNmsVc+ZT+sbynuu4HhwYzooMuSXq aEriIAD+0ZochcaeiCYmJJ50NB3s X-Google-Smtp-Source: AFSGD/WKptUgISes9By48ZbuZOaslQk4FV8iEYpH5F1m/bRZ5KI10HQiLxKj0v5KtvvlE8FDIA4r+g== X-Received: by 2002:a9d:2926:: with SMTP id d35mr18134164otb.355.1545319982898; Thu, 20 Dec 2018 07:33:02 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id l1sm11836355oib.10.2018.12.20.07.33.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 07:33:02 -0800 (PST) Subject: Re: Watching for view changes To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <8ce68eb6-4bae-447c-b9d2-f25e0c02546d@gmail.com> Date: Thu, 20 Dec 2018 09:33:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.