select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / SYSTEM INFORMATION FUNCTIONS AND OPERATORS

pg_input_is_valid

Read PG 18 manual ↗

Tests whether the given string is valid input for the specified data type, returning true or false.

Signatures & examples

pg_input_is_valid ( string text, type text ) → boolean
Tests whether the given string is valid input for the specified data type, returning true or false.
pg_input_is_valid('42', 'integer') → t
pg_input_is_valid('42000000000', 'integer') → f
pg_input_is_valid('1234.567', 'numeric(7,4)') → f
Version history 1
  1. PG 15 → 16added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source