Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su9uT-004eaN-MU for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Sep 2024 12:17:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1su9uS-008QTs-UT for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Sep 2024 12:17:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su9uS-008QTj-Kn for pgsql-hackers@lists.postgresql.org; Fri, 27 Sep 2024 12:17:20 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su9uQ-001Jdi-2A for pgsql-hackers@lists.postgresql.org; Fri, 27 Sep 2024 12:17:19 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1470:d7a0:cdb3:ed:178:ed8b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4XFTx811mtz3F6y; Fri, 27 Sep 2024 14:17:16 +0200 (CEST) Date: Fri, 27 Sep 2024 14:17:15 +0200 From: Christoph Berg To: Tom Lane Cc: Michael Banck , Tommy Pavlicek , Dagfinn Ilmari =?iso-8859-1?Q?Manns=E5ker?= , pgsql-hackers@lists.postgresql.org, jian.universality@gmail.com Subject: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR) Message-ID: References: <447166.1696969927@sss.pgh.pa.us> <560086.1698160614@sss.pgh.pa.us> <570833.1698162135@sss.pgh.pa.us> <66f33840.050a0220.1f9e60.7fb9@mx.google.com> <325394.1727365907@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <325394.1727365907@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Tom Lane > So the first part of that is great, but if your script file is > large you probably won't be happy about having the whole thing > repeated in the "QUERY" field. So this needs some work on > user-friendliness. Does this really have to be addressed? It would be way better than it is now, and errors during extension creation are rare and mostly for developers only, so it doesn't have to be pretty. > I'm inclined to think that maybe we'd be best off keeping the server > end of it straightforward, and trying to teach psql to abbreviate the > QUERY field in a useful way. IIRC you get this same type of problem > with very large SQL-language functions and suchlike. I'd treat this as a separate patch, if it's considered to be a good idea. Christoph