pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: PG14: "is of" vs pg_typeof
Date: Sat, 23 Apr 2022 22:47:22 +0200
Message-ID: <YmRl2o6ySTzBttYb@hermes.hilbert.loc> (raw)
In-Reply-To: <8064cab0-31b1-7ac3-ebdb-c1522f4cee6b@aklaver.com>
References: <YmReCy+ed+wTVpSJ@hermes.hilbert.loc>
	<8064cab0-31b1-7ac3-ebdb-c1522f4cee6b@aklaver.com>

Am Sat, Apr 23, 2022 at 01:43:52PM -0700 schrieb Adrian Klaver:

> >	select pg_typeof('a'::text) = any(ARRAY[pg_typeof(''::text), pg_typeof(''::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
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B





view thread (6+ messages)

Message-ID: <YmRl2o6ySTzBttYb@hermes.hilbert.loc>
Permalink:  ../YmRl2o6ySTzBttYb@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/YmRl2o6ySTzBttYb@hermes.hilbert.loc

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: Karsten.Hilbert@gmx.net
  Subject: Re: PG14: "is of" vs pg_typeof
  In-Reply-To: <YmRl2o6ySTzBttYb@hermes.hilbert.loc>
  References: <YmReCy+ed+wTVpSJ@hermes.hilbert.loc> <8064cab0-31b1-7ac3-ebdb-c1522f4cee6b@aklaver.com> <YmRl2o6ySTzBttYb@hermes.hilbert.loc>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox