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 1nPnhG-0004Gw-I2 for pgsql-general@arkaria.postgresql.org; Thu, 03 Mar 2022 15:48:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nPngj-0006mi-JN for pgsql-general@arkaria.postgresql.org; Thu, 03 Mar 2022 15:48:21 +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 1nPngj-0006mY-8r for pgsql-general@lists.postgresql.org; Thu, 03 Mar 2022 15:48:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nPngh-0006x5-6A for pgsql-general@lists.postgresql.org; Thu, 03 Mar 2022 15:48:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 223FmGPP3162860; Thu, 3 Mar 2022 10:48:16 -0500 From: Tom Lane To: Suresh Kumar R cc: pgsql-general@lists.postgresql.org Subject: Re: Couldn't cast to record[] In-reply-to: References: Comments: In-reply-to Suresh Kumar R message dated "Thu, 03 Mar 2022 15:32:27 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3162858.1646322496.1@sss.pgh.pa.us> Date: Thu, 03 Mar 2022 10:48:16 -0500 Message-ID: <3162859.1646322496@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Suresh Kumar R writes: > When I query that table I need the pg_typeof(column) as record[] instead of > composite_type[]. Why? record[] is considered a pseudotype (polymorphic type), which is why casting to it doesn't do anything. regards, tom lane