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 1ncqPm-0000tL-Gf for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Apr 2022 15:20:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ncqPl-00044U-55 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Apr 2022 15:20:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncqPk-00044L-CG for pgsql-hackers@lists.postgresql.org; Fri, 08 Apr 2022 15:20:44 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncqPg-00089Z-SF for pgsql-hackers@lists.postgresql.org; Fri, 08 Apr 2022 15:20:43 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 652FE5C0153; Fri, 8 Apr 2022 11:20:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 08 Apr 2022 11:20:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=yh3Z/3V55PIJoT gcPQxScIbq8v8RhCHtlYuP77mbhJE=; b=D78MToo+NDzpzsTR8rPrA7YzzBL3SJ 8+hw9mOQQmG/RbNm2LpV/2O2+4jE9SG5Fz94yRUGVZ7teQGDSpfChOTweYEiUKGr z7u6GMHjzy4Q96AxKQfsCY805qt4vcMqfcUJCOLUKQkiAJK3/oGo7WmT9yfbBPDT K1PwSOWitnglgl38F/rxz4un8EfrhWHekow8Lg1tlmro06wULQ/pqAwOZxaKw/fu qYiJ0G7kHFkxIhRo0DkXJJ7avLefwrLc2qVluB1ioJQQB0NalATRCsnHjWrqn+7R vidfiXIuXq6dpKNiozql4QFyX3AdFkyyl1pBMp6pMMbDmb+aW8Sf5jkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=yh3Z/3V55PIJoTgcPQxScIbq8v8RhCHtlYuP77mbh JE=; b=WYQ7cThPyHyCC3m23QS08kUmi6uvtfAJbIQosPpUMSgbDFnc1aghLPo5W kfaM1R4RBaMr2IYRhqCirXxfE6MHV5zy+ycU9re8oMDTKR/MDNSBXraUQWl8myyG w6jJn0GuL++xbZthPL9hTGGZGoecGKoUTbAlBpVEUED+H4ejGhdxXxVvouW1Fymb MF+DL3QVcxFmit9RDqekPoLIdISGcUc0rEzDZqKlOx2ta5O657urKiFvKDpmgDJz oQaFkOZZT6E4lTbu0+Ez2mOqySOd2fK3pIapx1gFG2lJUeY6UWifbS0bu+on/MKe 0cBtY6l1kLCG+dctghQ8BwdL4jwrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudektddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomhepffgrghhf ihhnnhgpkfhlmhgrrhhipgforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrih drohhrgheqnecuggftrfgrthhtvghrnhepfedvfeeigfdugfdthfffleduudevffejvdef keeuvdeiiedvjedtueejfeefudegnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdroh hrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehi lhhmrghrihesihhlmhgrrhhirdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Apr 2022 11:20:37 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Matthias van de Meent Cc: Andres Freund , Nitin Jadhav , Bharath Rupireddy , Ashutosh Sharma , Julien Rouhaud , Bruce Momjian , Tom Lane , Magnus Hagander , PostgreSQL Hackers Subject: Re: Size of pg_rewrite References: <20220319001556.atuqbmafvc73pa2k@alap3.anarazel.de> Date: Fri, 08 Apr 2022 16:20:36 +0100 In-Reply-To: (Matthias van de Meent's message of "Fri, 8 Apr 2022 16:52:07 +0200") Message-ID: <878rsfppob.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matthias van de Meent writes: > But, as text literal concatenations don't seem to get constant folded > before storing them in the rules table, this rewrite of the views > would result in long lines in the system_views.sql file, or we'd have > to deal with the additional overhead of the append operator and cast > nodes. There is no need to use the concatenation operator to split array constants across multiple lines. Newlines are fine either inside the string (between array elements), or between two string string literals (which become one string constant at parse time). https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS ilmari@[local]:5432 ~=# select ilmari@[local]:5432 ~-# '{foo, ilmari@[local]:5432 ~'# bar}'::text[], ilmari@[local]:5432 ~-# '{bar,' ilmari@[local]:5432 ~-# 'baz}'::text[]; ┌───────────┬───────────┐ │ text │ text │ ├───────────┼───────────┤ │ {foo,bar} │ {bar,baz} │ └───────────┴───────────┘ (1 row) - ilmari