Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6fgd-0006yV-4E for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Oct 2017 16:34:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e6fgb-0003g7-Nn for pgsql-bugs@arkaria.postgresql.org; Mon, 23 Oct 2017 16:34:45 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e6ffs-0002QD-MT for pgsql-bugs@postgresql.org; Mon, 23 Oct 2017 16:34:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e6ffo-00082G-PS for pgsql-bugs@postgresql.org; Mon, 23 Oct 2017 16:34:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9NGXq23005380; Mon, 23 Oct 2017 12:33:52 -0400 From: Tom Lane To: Andres Freund cc: gomer94@yandex.ru, pgsql-bugs@postgresql.org Subject: Re: BUG #14867: Cascade drop type error In-reply-to: <20171023161726.5hr6rs56hxn67zz2@alap3.anarazel.de> References: <20171023150118.1477.19174@wrigleys.postgresql.org> <4421.1508774964@sss.pgh.pa.us> <20171023161726.5hr6rs56hxn67zz2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 23 Oct 2017 09:17:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5378.1508776432.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Oct 2017 12:33:52 -0400 Message-ID: <5379.1508776432@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund writes: > On 2017-10-23 12:09:24 -0400, Tom Lane wrote: >> Cute. Type my_type isn't exposed as a dependency of the view, >> because it's only referenced internally in the expression tree >> not as a result column type. We can fix that easily enough by >> teaching dependency.c to log the result type of a FieldSelect >> as a dependency. > That does remind me of patch 0001 in > http://archives.postgresql.org/message-id/20170314224706.nxvtapenky6eom3z= %40alap3.anarazel.de It is in the same part of the code, but seems directed at a different goal (which I disapproved of, IIRC). But we definitely need the principle that any type OID appearing in an expression tree needs to be logged, except in cases where there's necessarily an indirect dependency (eg, a function or operator's result type doesn't need to be logged separately). regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs