Checking The Type Of A Value
> select pg_typeof(1);
pg_typeof
-----------
integer
(1 row)
> select pg_typeof(true);
pg_typeof
-----------
boolean
(1 row)> select pg_typeof('hello');
pg_typeof
-----------
unknown
(1 row)> select pg_typeof('hello'::varchar);
pg_typeof
-------------------
character varying
(1 row)Last updated