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 1n5Mvu-0003GW-MF for pgsql-general@arkaria.postgresql.org; Thu, 06 Jan 2022 07:11:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5Mvt-0004JY-AQ for pgsql-general@arkaria.postgresql.org; Thu, 06 Jan 2022 07:11:33 +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 1n5Mvs-0004JP-Vi for pgsql-general@lists.postgresql.org; Thu, 06 Jan 2022 07:11:32 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5Mvp-00010y-W2 for pgsql-general@lists.postgresql.org; Thu, 06 Jan 2022 07:11:32 +0000 Received: by mail-ot1-x32e.google.com with SMTP id g79-20020a9d12d5000000b0058f08f31338so2170613otg.2 for ; Wed, 05 Jan 2022 23:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=q+e4Z5618sbLxfoHTFQKoT13WO11bkbsQ7tX/1DxZx4=; b=Hi8pNkWLz75XsI+nvAEDHP0jO27FUxu/XBcMbJTp9Q/4B4OuAYJ2+HxKYdQjP/2suv N3m85ZUKoRBMV1EsQ9wOEjbRvXmlkwZ/8y1SdhrTCEmtNRJNrBNbgJeW9HpkfsYWNn5U OMR7RpXloyqgOYQemWeB+AB0ca1pYhx2N++Zmaa1gTgQulbPM7LO3NE+xYomafxSBKWd JpPy5isNoLFSf0H9gvTQw3O89YmEDPQXYjkZyvzF7iaE0z/jtsKKY5weK+GsGOAqJx5e +13lwXht6ZhoG3DBw1YwsaOCu6AAUCD1rr/l3lF1/bpmETH/Ireh1eKDGyQhTXHqUEeq 9WUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=q+e4Z5618sbLxfoHTFQKoT13WO11bkbsQ7tX/1DxZx4=; b=Xtyo/oxZIjX1pFSvevlSF/2pqwphErPd4vnC+woxcjQKuMRA3KjWUjMqjjPHZABe68 smEHsNiG8UHiCFmLKpXeyqS8Cbc1lY8rLos5RU1fzlRYlTQ7f9r6ZcuM1bo/Lo0wEW8U 9r/xXQYEPT0o3S28c1hqCxiTzEdfEGe6bFsTJy1ygqEekVmu0KbBxsi87974Ere3kOUC qukiUj1v0kRMNm8yTEx9upkKmVNT6RrCK3VKeQPcc4P7FGfbclLJGPAwu2+OrSUdFrck KGF45tgXjYgivAlWhej0fCR/cD+QO0NDODz9oJl0+YWziNhBgHAkPS3GgUgt5OAr37Qc sgOg== X-Gm-Message-State: AOAM532XAQlGVG7DsbuwUyaeIZsv+bV8OgBGoUwBDKj91YJfPxjzvsJe 69BiJVv4Zuz5UHJ3YJpum9m6WKZgcj8= X-Google-Smtp-Source: ABdhPJyG7nGzScV8wQLjzrfjnGEk4R7T7bEbc15qUPbtrTMjnxo6CF5ihlD9qWWcqNhEepMbfrBkfA== X-Received: by 2002:a9d:206a:: with SMTP id n97mr43887001ota.142.1641453087835; Wed, 05 Jan 2022 23:11:27 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id a6sm268879oil.6.2022.01.05.23.11.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jan 2022 23:11:27 -0800 (PST) Subject: Re: How to write such a query? To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Thu, 6 Jan 2022 01:11:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/6/22 1:07 AM, Igor Korot wrote: > Hi, David, > > On Thu, Jan 6, 2022 at 1:00 AM David G. Johnston > wrote: >> On Wednesday, January 5, 2022, Igor Korot wrote: >>> >>> Is there a way to write such a SELECT statement with the >>> named parameter in PostgreSQL? >> >> The server, and its prepared SQL capability, doesn’t understand named parameters. Only numbered ones. >> >> That said, there are a number of different ways to write and execute SQL available to you and each of those provides different extended capabilities. For instance, psql and its variables feature. > It looks like your answer contradicts with Ron... TIMTOWTDI -- Angular momentum makes the world go 'round.