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 1oa0v9-0003hH-LI for pgsql-general@arkaria.postgresql.org; Sun, 18 Sep 2022 20:29:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oa0v8-0006ip-GO for pgsql-general@arkaria.postgresql.org; Sun, 18 Sep 2022 20:29:42 +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 1oa0v6-0006ig-S3 for pgsql-general@lists.postgresql.org; Sun, 18 Sep 2022 20:29:42 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oa0v2-0005UJ-0e for pgsql-general@lists.postgresql.org; Sun, 18 Sep 2022 20:29:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DF24E3200B06; Sun, 18 Sep 2022 16:29:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 18 Sep 2022 16:29:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=fm1; t=1663532972; x= 1663619372; bh=i1ASW2Vh/m290HR/OqyRxfXnpahLzAEARF/8qIebb7c=; b=Y yZ/9Fag2TPHvxdd8dS7bFH1z8r6FVT/IY4CxV00SfHkHDn8T7g3BoL0OmomSBqFF YJcgE8uY2k9typvZTaYJlcwMDYsVwPHOn6ez2O7E+Q9IrEx9HLupGtgMTowxpbhF IyaRHA8xZjZtlmzJ0EXSXQGI+idaoDr8J7NsjtF8r9GwZ91j5SxEWCV1QqTysjrE bDRk+UyY3pnnv0MfDVLOcQ6fGM+Pkomahlfc78OKg6WdWhr+0L4xdtoO6GyV0oKF nFngeRCjH+FfnY2KS2wxZtKbRm8E2wSr8j4dv9IKwE+tsL8Zk6JrU1I3LVHw5Y25 pvd+dy35GuNeDrbEyDtRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id: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=fm2; t=1663532972; x=1663619372; bh=i 1ASW2Vh/m290HR/OqyRxfXnpahLzAEARF/8qIebb7c=; b=PRVAixSvglN8zPVtx DG+7yhtA9mS+ieLgJVTBweCMY4C5wA8t/PonpWlgOWNQarmYnYuTNSsA9RYt62OI UC2d++FDkARWV2a0d7HEYSj2pBB6SCi7UsVyxYvBQtSW7h5l4rKwEdge1zxMrBUk +v83ZSEqjDyB2bCL3+LmgLeyBj71vGlBlQWpUFUJzsKn2Wm3L8UMxod8sBLQhfzx MEVNoA1tGrfiFsn/8ZIYF+aZWJSgTo22/mxd5fsq8+QCNN+B1m1+N8u+36nRvNEX HMoFRj7h2dLibVBNWfNIseiegeohavBNwz1+CgsD4NF1sNuFT11t2QWfSX9baSpW sbC/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvhedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepffevveeitedvveetheeffedtueevvddvtdevffdv fffgfeeiffegtdekgfetvdegnecuffhomhgrihhnpehsthgrtghkvgigtghhrghnghgvrd gtohhmpdhpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvg hrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 18 Sep 2022 16:29:31 -0400 (EDT) Message-ID: Date: Sun, 18 Sep 2022 13:29:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: =?UTF-8?B?UmU6IFdoZXJlJ3MgdGhlIGRvYyBmb3IgImFycmF5KCkiIOKAlCBhcyBp?= =?UTF-8?B?biAic2VsZWN0IGFycmF5KHZhbHVlcyAoMTcpLCAoNDIpKSI=?= Content-Language: en-US To: Bryn Llewellyn , pgsql-general list References: From: Adrian Klaver In-Reply-To: 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/18/22 13:25, Bryn Llewellyn wrote: > I noticed that "array()" is used in the query that implements the "\du" > psql meta-command. It has some similarity with "array_agg()" thus: > > create temporary view x(v) as (values (17), (42)); > select array_agg(v) from x; > select array(select v from x); > > Anyway, I can't find where "array()" is documented. Google does find me > a hit on stackexchange.com . But it doesn't > x-ref to the PG doc. https://www.postgresql.org/docs/current/sql-expressions.html 4.2.12. Array Constructors "It is also possible to construct an array from the results of a subquery. In this form, the array constructor is written with the key word ARRAY followed by a parenthesized (not bracketed) subquery. For example: SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%'); ..." -- Adrian Klaver adrian.klaver@aklaver.com