Conversion

PG_TYPEOF

PostgreSQLPostgreSQL

Mengembalikan nama tipe data dari nilai. Berguna untuk debugging dan introspection.

Tipe hasil: regtype

Syntax

SQL
PG_TYPEOF(any)

Parameter

valueanywajib

Nilai yang dicek tipenya

Contoh Penggunaan

Check Type

SQL
1SELECT PG_TYPEOF(123), PG_TYPEOF('hello'), PG_TYPEOF(NOW());

Mengecek tipe berbagai nilai.

Hasil
pg_typeofpg_typeofpg_typeof
integertexttimestamp with time zone