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 1puDuH-0005Pj-Hb for pgsql-general@arkaria.postgresql.org; Wed, 03 May 2023 14:56:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1puDuG-0007tA-Fx for pgsql-general@arkaria.postgresql.org; Wed, 03 May 2023 14:56:36 +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 1puDuE-0007s7-Pr for pgsql-general@lists.postgresql.org; Wed, 03 May 2023 14:56:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1puDu8-000MOM-N7 for pgsql-general@lists.postgresql.org; Wed, 03 May 2023 14:56:34 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C376A5C0063; Wed, 3 May 2023 10:56:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 03 May 2023 10:56:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type: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; t= 1683125785; x=1683212185; bh=Wy+L7/M3ToNrOHFjXnuMszbkeOpT9s1WM1H c4URvPGA=; b=LA8cdKHTxQahLlIcIAJ/SgsmbHXAR70fkcpBxVDZoHMRU2jiGvg 8NaKZ814Wf/YBCs+lEC8zvpSotlagHIxmWjdNvvmNUCwzLXIvKmEESYRoIutT+4S k+wWITqUhkT0eRXAWBxdwl0A4ehKhFZrzwzF//duADpL16r8rNt73wGEZZqOTfEq BB/NBwzEhyK425AJmjOjbTgS59dSUgrC60EM04rAdK+5Oc6XmIYQxF0PmHx8ZcLO TB2xGb9TBYrwW6sSSg9JHQ5o1R8JLb94549TmQQ5YMXl0WwtmyEjxcqwEj8MgtMQ Ba8JqFJ1O3sfe+iDds0xfmNVcO+ojB6YvjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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=fm3; t= 1683125785; x=1683212185; bh=Wy+L7/M3ToNrOHFjXnuMszbkeOpT9s1WM1H c4URvPGA=; b=Fx1titqFzj/yAdkyBocsbRiWCqRDU6ysY487zaIvRTF6Xz8yffr gxfe+B0ilFOz+xj4DqlbZ24/cFI5NFxgMh4aMZXTo9TNr38xbQelogOudyDYAoQL 7pUQQ1jpLxG9XZfxmaJaprNwENsQDNVgZJJ1RFlmFuB9QCpjFxxNS9NHobxb62E1 b8bNguEz51wVDtGoQLYpEinoRJq6FyYg8+0JF9vX/IHgYD3YTy2j7bEBtAPAtcyJ hODkjxgMahIVUkZc7PCpKQlg8ANpfVqSkVm8DaHp1TodCG60nK0MC1O7aLg774TJ Fp4ztceVd04prkFB3slGar9RMD0pJ5zf7Hg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvkedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnheptdfgvdfgieekfedtvdffkeevgffgvefggfehleei ledtjeffffffhefgffehvdffnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 May 2023 10:56:24 -0400 (EDT) Message-ID: Date: Wed, 3 May 2023 07:56:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: PL/pgSQL doesn't support variables in queries? To: "J.A." , Tom Lane Cc: Erik Wienhold , pgsql-general@lists.postgresql.org References: <658455455.1152531.1683117585087@office.mailbox.org> <2955822.1683120535@sss.pgh.pa.us> Content-Language: en-US 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 5/3/23 07:34, J.A. wrote: > Ah - I think I'm starting to follow. > > what i was _trying_ to do is this > > get value from a column and stick it into a variable. > > now select * from a _number_ of tables and return a -multi recordsets- > from this single query. I'm not sure if that is the same terminology, in > pgsql? > > So is this possible? Many things are possible and they are covered in the documentation: https://www.postgresql.org/docs/current/plpgsql.html Read through that and you will find your questions answered. > > -JA- > > -- Adrian Klaver adrian.klaver@aklaver.com