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 1oTlIO-00069p-Pq for pgsql-general@arkaria.postgresql.org; Thu, 01 Sep 2022 14:35:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTlIN-0005T1-4O for pgsql-general@arkaria.postgresql.org; Thu, 01 Sep 2022 14:35:51 +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 1oTlI4-0005PM-GE for pgsql-general@lists.postgresql.org; Thu, 01 Sep 2022 14:35:32 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oTlHw-0000eY-Ly for pgsql-general@lists.postgresql.org; Thu, 01 Sep 2022 14:35:31 +0000 Received: by mail-qt1-x831.google.com with SMTP id y18so13538046qtv.5 for ; Thu, 01 Sep 2022 07:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xxllnc.nl; s=googlemail; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=jz0CYsSjc/f9G5Yynt/7EypX/r9tYVn3NsKJmpjLevE=; b=DYQnf0tO1tHMH5dB+pGNI30KP3jJumXoG8XaH3uC0a3lv8J4dRCStNrkFnsWWCtqD3 P5smCKaP2rar45qH8ihLMIct0WEwgPnxDff771MHlwqOZ9dwd4/RGbZdY4YUtbt0beyb EWhGPf7kfo7djgZYXsvsybgUiheiVmn56o4NOj+p4WqzNpYlyfryhX7TlavIwUv0jjJJ FTlkLjgWfdHRYCMTRjAvSwR/2qMJ7NAJoMzpLy3bjsSVw4PO03FKoiLRKvFBuvThxHsP WEb7+BUBtfyWZ8oY2HHRhT7RCFRgdKFGrXd5bAM1GIQs/7xTAQxU24yVdgsbUa9RO1ZY mIhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=jz0CYsSjc/f9G5Yynt/7EypX/r9tYVn3NsKJmpjLevE=; b=03etP7aC5+Lc3x0Ra+jJ5jhCiQTExWlhWdzdVfwqvjLni8pusuqzXo7yyCh96nGWg8 sd2MeaYl/h97wBm2CZIq/ML+11TXWDCUIBr+p9MQEcpqOsNa74f/CoZJCPj4oGiq/tW+ GeyqHBJR/k+YBBuxgmd9G5TOIOz0XpGW7Q/PR+pvSFIwwrcO2sSQ+iw5tWBqati3y683 uihgbAOENOJm+aMItNrZjModhGhyZg2g/mY1GaTAQaIHZDcIiJQOKPmNlO5zo/yWuJJR rcCLIwGqMj14mTiaSszG2a2gDHzwAk5rQkG6IWEBFWOFpYpMbfK5EU2rQlczjnY7MPsY aNdw== X-Gm-Message-State: ACgBeo0dmuxYCKXLk+aEALatbfHc+rdpy4hui6rgdFy7mUQwzDm03sk9 /bR39cNe4tdmgT+ze//NrC/CsQ== X-Google-Smtp-Source: AA6agR6TBB0LqzIFEvBPqJtUKf3PjcmCBpnPI7F9xwGiCjZXHbrFumtoW1KqAgUPob0xdf1kELBJ/g== X-Received: by 2002:ac8:7d4a:0:b0:344:6f12:1543 with SMTP id h10-20020ac87d4a000000b003446f121543mr23779669qtb.426.1662042922640; Thu, 01 Sep 2022 07:35:22 -0700 (PDT) Received: from [192.168.0.42] ([186.189.151.69]) by smtp.gmail.com with ESMTPSA id bp8-20020a05620a458800b006b93ff541dasm12226830qkb.8.2022.09.01.07.35.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 07:35:22 -0700 (PDT) Message-ID: <6310c32a.050a0220.40c46.6019@mx.google.com> Date: Thu, 1 Sep 2022 10:35:20 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: View definition changes after reloading pg_dump export Content-Language: nl To: Tom Lane Cc: pgsql-general@lists.postgresql.org References: <58cef826-706a-3838-3ce3-e6011c2ccd76@exxellence.nl> <402822.1662041327@sss.pgh.pa.us> From: Wesley Schwengle In-Reply-To: <402822.1662041327@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/1/22 10:08, Tom Lane wrote: > Wesley Schwengle writes: >> There is a view that we create and it uses a function and the view >> definition changes between runs. I'm not sure why this is happening, >> does someone know? > > The core reason for the discrepancy is that the parser inserts > implicit coercion steps into your initial, not-very-consistently-typed > query; but the view-dumping logic (ruleutils.c) tends to display > those steps as explicit coercions. Thanks for the clarification, it makes a whole lot of sense. And indeed, when I type the SQL like so ARRAY[foo.bar::text, foo.baz::varchar::text] the view definition does not change between runs. Cheers, Wesley -- Wesley Schwengle, Developer xxllnc Zaaksysteem, https://www.zaaksysteem.nl