mirror of
https://github.com/Syfaro/fuzzysearch.git
synced 2024-11-13 02:12:33 +00:00
12 lines
216 B
PL/PgSQL
12 lines
216 B
PL/PgSQL
CREATE OR REPLACE FUNCTION isnumeric(text) RETURNS BOOLEAN AS $$
|
|
DECLARE x NUMERIC;
|
|
BEGIN
|
|
x = $1::NUMERIC;
|
|
RETURN TRUE;
|
|
EXCEPTION WHEN others THEN
|
|
RETURN FALSE;
|
|
END;
|
|
$$
|
|
STRICT
|
|
LANGUAGE plpgsql IMMUTABLE;
|