mirror of
https://github.com/Syfaro/fuzzysearch.git
synced 2024-11-05 06:23:08 +00:00
Add missing isnumeric function migration.
This commit is contained in:
parent
914a9b24ba
commit
9255a49fb5
1
migrations/20210822052026_isnumeric_function.down.sql
Normal file
1
migrations/20210822052026_isnumeric_function.down.sql
Normal file
@ -0,0 +1 @@
|
||||
DROP FUNCTION IF EXISTS isnumeric;
|
11
migrations/20210822052026_isnumeric_function.up.sql
Normal file
11
migrations/20210822052026_isnumeric_function.up.sql
Normal file
@ -0,0 +1,11 @@
|
||||
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;
|
Loading…
Reference in New Issue
Block a user