Re: PG14: "is of" vs pg_typeof

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PG14: "is of" vs pg_typeof
Date: 2022-04-23 20:47:22
Message-ID: YmRl2o6ySTzBttYb@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-04-23 20:57:48 Re: SELECT creates millions of temp files in a single directory
Previous Message Adrian Klaver 2022-04-23 20:43:52 Re: PG14: "is of" vs pg_typeof