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 1o7DtU-00049g-LZ for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Jul 2022 10:29:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o7DtS-0001YU-NZ for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Jul 2022 10:28:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7DtS-0001YD-DS for pgsql-hackers@lists.postgresql.org; Fri, 01 Jul 2022 10:28:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7DtP-0002sd-Ki for pgsql-hackers@lists.postgresql.org; Fri, 01 Jul 2022 10:28:57 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A99413200955; Fri, 1 Jul 2022 06:28:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 01 Jul 2022 06:28:53 -0400 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=1656671333; x=1656757733; bh=N hti7yqu0PQ0xIfTd+7UDlLPqJ7NkMFtJpqdXH88VFY=; b=crGXOsGVKQJZBIcd5 7YBKnQ8l1B9qDULEzYYJggH1RhgNErGchZsWKP+ZQOFnMzcRTbnlOLTEq/hr2A0d GeqLSguOjRZT4I3FmCrZnnyUmZmNclQ3FWlyVCpNtgk1p+K/P8JyJkQ+pCg4D0MQ jW8aXVCzbkYaO6qQMrEuOenEskD/RK/Q+PhnxcJqPax/qNy58ueqJon07x6i+vH7 JTLJeSdz3rvv0eLJ88twuM4nAjJvlh18XYEHDtOO44ZN+7zptV67zEZOs5ckr3IB 6nhEUVyLn7wMh+asnTfl2+uoLEe65XbkpVwosTERYtCfQ3NC9iayfykCVt8m7G53 xIznw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehfedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnheplefgteefiedtleelgeeg jeevhfeuteefvddtjeehveeuieefgedvhfeuleduteeunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Jul 2022 06:28:51 -0400 (EDT) Message-ID: <58307e2c-a26c-d438-27f7-5bef9f693943@enterprisedb.com> Date: Fri, 1 Jul 2022 12:28:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] Add result_types column to pg_prepared_statements view Content-Language: en-US To: =?UTF-8?Q?Dagfinn_Ilmari_Manns=c3=a5ker?= , pgsql-hackers@lists.postgresql.org References: <871qwpo7te.fsf@wibble.ilmari.org> From: Peter Eisentraut In-Reply-To: <871qwpo7te.fsf@wibble.ilmari.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 19.05.22 17:34, Dagfinn Ilmari Mannsåker wrote: > Prompted by a question on IRC, here's a patch to add a result_types > column to the pg_prepared_statements view, so that one can see the types > of the columns returned by a prepared statement, not just the parameter > types. > > I'm not quite sure about the column name, suggestions welcome. I think this patch is sensible. I see one issue: When you describe a prepared statement via the protocol, if a result field has a domain as its type, the RowDescription message sends the underlying base type, not the domain type directly (see SendRowDescriptionMessage()). But it doesn't do that for the parameters (see exec_describe_statement_message()). I don't know why that is; the protocol documentation doesn't mention it. Might be worth looking into, and checking whether the analogous information contained in this view should be made consistent.