/*
do $$
begin
	if exists 
	(
		select * from pg_proc p
		inner join pg_namespace n on n.oid = p.pronamespace
		where p.proname = 'isnumeric'
		and n.nspname = 'dbo'
	)
	then
		drop function dbo.isnumeric(varchar(128));
	end if;
end;
$$ language plpgsql;

CREATE OR REPLACE FUNCTION dbo.isnumeric("str" varchar(128)) RETURNS boolean AS '
SELECT "str" ~ ''^([0-9]+[.]?[0-9]*|[.][0-9]+)$''
' LANGUAGE 'sql' immutable;
*/
CREATE OR REPLACE FUNCTION isnumeric("str" varchar(128)) 
RETURNS boolean 
AS 'SELECT "str" ~ ''^([0-9]+[.]?[0-9]*|[.][0-9]+)$''' 
LANGUAGE 'sql' immutable;