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 1niMf9-00086r-DL for pgsql-general@arkaria.postgresql.org; Sat, 23 Apr 2022 20:47:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1niMf8-0004dH-AY for pgsql-general@arkaria.postgresql.org; Sat, 23 Apr 2022 20:47:26 +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 1niMf7-0004d8-SI for pgsql-general@lists.postgresql.org; Sat, 23 Apr 2022 20:47:25 +0000 Received: from mout.gmx.net ([212.227.17.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1niMf6-0005y3-LK for pgsql-general@lists.postgresql.org; Sat, 23 Apr 2022 20:47:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1650746843; bh=yciDEhMfGVa3yfvYwk6tJDfRDLPit7G2Hu9j3i8BzbE=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=EpxbNgnKoaxQGBTAnSSy3yxe3Q1eHfGbyZozqS+vQIpjkRBjXmLnmW1CJxEqyDmTH SXTXoTuO7179EEXHezdxbkmuKJpZ+rLtm5LzA9P7Ox+O23GAs7psDqLi/Umw42m8fh tBBICBPt9UfRZEcy5rFx4Ufagf8EyuBI0FqdJ75k= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermes ([84.190.227.248]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUGeB-1nIgmG1dz9-00RLCn for ; Sat, 23 Apr 2022 22:47:23 +0200 Received: from ncq by hermes with local (Exim 4.94.2) (envelope-from ) id 1niMf4-0005al-Kg for pgsql-general@lists.postgresql.org; Sat, 23 Apr 2022 22:47:22 +0200 Date: Sat, 23 Apr 2022 22:47:22 +0200 From: Karsten Hilbert To: pgsql-general@lists.postgresql.org Subject: Re: PG14: "is of" vs pg_typeof Message-ID: References: <8064cab0-31b1-7ac3-ebdb-c1522f4cee6b@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8064cab0-31b1-7ac3-ebdb-c1522f4cee6b@aklaver.com> Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) Sender: X-Provags-ID: V03:K1:FM6ZVW0h0ske/xGEyTdyyDi+Hel4gwTrnxGuxk1Aujeq9UpQ6nw 4ZQDwbirLFfmrMlHzJfNRtcNUkvfF/Oiq8YPjWGWmWEKm8XSR6NN7pZbD5T1kRwoN5/l2jP jwEUIt5w43elBzqe0MZqtKYRgOPrDwaENRJq0wmI92DVs4z4QBD5cNmPHnweHPfXTWpPf9L oXTnYlHcu1VENSoicISMg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nC1uQIKZ4mg=:hEZXLa9PeA8FqABAUYLHgQ zT6Jd2KCsxTcE623imq/s7PUN0dbbk0dVzy7MLldV4myH8zXYKYBqyH3r54Z7j/UBnhX4eOQD NqBEBRRieFuyTTMfkkFI6cfCd+Fdya5/po47hmsiblKE6yLStZz2pNk8HZc65wpU60hda0vgn PlY4VoLvCe/0H0HyRuicjLCdaiqtRuW1knjyh4IXDHE+BKXteNwX/Hu6c+uryyba1dnsMFUfw /MEN0Qq6+PLYOqrwDPvSOBrc03X4NPSHzhkTrmheTbye4tvCzUECjW/+AAxP1g6xiKMROe2Zr a+hAH5vI2BMy07R/DLMmhyUs1ihU8l+ksf2wLcUUOmw38LJHGczW76BW/B2ZZJkBunl0Jmz8V T1UUh0SuBa09HCYwsYe8emPdWl0aikvsudGnUGgJiVvd0X7y5/PsgnSpmks8n8CL6GIyZWYGL F7bCYKsDr7MgkxBC6hqL0//lhpR276S3xu70iBkWGmHtcEpbaOeEhdMkbVgbxPjYpDxjMzp78 MvHOaEVdqaC+HSyWct5z+QSsrGHz3S0HSraV5iTf+ttvutm0dwDthJ4MS8+i41EBW1RAhjCcF rsXMrTuUg6v2Ow9f9Q49sC2Qeyvjoz9vSkXSoooxN6uePB3yPTZzpBlaCfb5Rn7jIFrvcUigb 6GT9cbqlUaqcDemzafi+llwkuGvFrBc50sjTRgTlwXBzLXm5LrYAf8auhTIjN8eZ4M3ZjGLpl 6eJ5F37+TpaIqxxm1D3qVBnVLt+rcjUr/y0xJldXV/Wx7Qy1oyqEEKw4Ah8MeQiwlDPG6BskB oBSLLXWpX21sjgaeGJ9Q5SRcNEUCWFmJNHX9WOEdIF0fI2W+cHKJ+o59dmIGJhUhZK+VCQJ3o TIlSSM8RziTnmIBnNoYDM6wwWDE87gpwQbPi6xC5HvS8Bw/PKF00n1lkE8G/zeCbIpe7GTJVp 0CRFs1S6su6PEdXl+B3t2vB2mVWFF+sUNF/0pFhSzCpO5du1pniOTUisteq2phTVVz+O1UCIw pV7amxUCvBvldw7QQTQ4bN+WFX0ibPHoBSJgl6x0ms+JzSZoipsK4iyde/aqWRRi7HmjAXvxm WEM5Wxiqq4/LH0= Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am Sat, Apr 23, 2022 at 01:43:52PM -0700 schrieb Adrian Klaver: > > select pg_typeof('a'::text) =3D any(ARRAY[pg_typeof(''::text), pg_type= of(''::name)]); > > > >Is there anything obvious I am missing for easily > >resurrecting the above "is of" use ? > > Actually it can be done as: > > select pg_typeof('test'::text) in ('text'::regtype, 'varchar'::regtype); Found that, but thanks anyway. Karsten =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B