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 1krsZ6-0004oX-DG for pgsql-general@arkaria.postgresql.org; Wed, 23 Dec 2020 01:03: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 1krsZ5-00026R-BK for pgsql-general@arkaria.postgresql.org; Wed, 23 Dec 2020 01:03:43 +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 1krsZ5-00026K-39 for pgsql-general@lists.postgresql.org; Wed, 23 Dec 2020 01:03:43 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krsZ3-0005es-4h for pgsql-general@postgresql.org; Wed, 23 Dec 2020 01:03:42 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E21635C0097; Tue, 22 Dec 2020 20:03:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 22 Dec 2020 20:03:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=t 3I3hTCZq0aISZ+H2/fd5h6ppqFni1ww3TSTmAHiquo=; b=apSOC+XGag3bfMDkn 5YJ4l0Jf4kYECfaY1PcFGeY5rPsOYwPwpktJVK5A6jgiIay0Sq2Qt7gfyO4+pOY3 DiYJNXhxBy9R+b8gYePG/+v0guVksA3pz7xj32y6Srkw2l5mHL0SYzv/2sVYD4Xt i6SxdrptKoxnNSVDLnqvB+CoKJ5OBHle5ebQ4TfcFkL5YvX22iLyUbQd5f+jqkQv L4U0i+LPoWS7AQ6Ct8utoszPGbJN5bEQVSq3C552WZKRdIxf/+zRSaPqRuTPxt0K cNSyKJ2H22RyKke4xMuqxDfLNgSZTpVPmUxzjhYjnk563UgH1/webMyt+eAcoFOB J5cXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=t3I3hTCZq0aISZ+H2/fd5h6ppqFni1ww3TSTmAHiq uo=; b=faj41UMavlfFEQIdXz+pxy5ksx+QsJPoT+dfQuxZ1P/8EkecCJXzE4ZNA m0/aVgYftlusmd/vKcJg146eDai4KymGYdf9EfEtuCEUKiIIemkwdYQyZQ3BUGB8 eGdB88NZkPlqm/VtKMW3xwomyW2GUxv1uk0XaUlc454m8dVRmhLegDSOjnc4Gmrt UhUcCqtKP8SdNcD0XUya8yuG/EZQObyCPhUxVF9SIcZ8Khfl0brXw4GDz+3v3Lq5 gp6ndofASrpUL1vInI8O/JOEUKNNqoAiW4TZNviKoTCXqYAn9tZVzDHTp9Nbq8GJ qZMyteRKzIeIIEHyQmf+dKbjPhvZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddthedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepjeehrddujedvrddugedrudejnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (75-172-14-17.tukw.qwest.net [75.172.14.17]) by mail.messagingengine.com (Postfix) with ESMTPA id 57835240057; Tue, 22 Dec 2020 20:03:39 -0500 (EST) Subject: Re: Information schema sql_identifier To: "David G. Johnston" Cc: pgsql-general References: <653c81a9-bc2b-e7a6-1ece-eab59f007400@aklaver.com> From: Adrian Klaver Message-ID: <16a428e1-2535-e67e-1510-0ad0fc61ae8d@aklaver.com> Date: Tue, 22 Dec 2020 17:03:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/22/20 4:33 PM, David G. Johnston wrote: > On Tue, Dec 22, 2020 at 5:08 PM Adrian Klaver > wrote: > > SELECT pg_table_size(table_name::regclass)  from > information_schema.tables; > ERROR:  invalid name syntax > > So how does one go about using a table name from > information_schema.tables in pg_table_size()? > > > Find that the function signature in the documentation requires an input > of "regclass" and ignore attempts to pass anything but that to the function. > > pg_table_size ( regclass ) → bigint > > I observe in v13 that the expected syntax works just fine: > > select pg_table_size((table_schema || '.' || table_name)::regclass) from > information_schema.tables; Yeah I tried that, didn't include in my previous post: select pg_table_size((table_schema || '.' || table_name)::regclass) from information_schema.tables; ERROR: invalid name syntax > > David J. -- Adrian Klaver adrian.klaver@aklaver.com