Hi Daniel,
You should define a PL/PGSQL function such as:
CREATE OR REPLACE FUNCTION check_version()
RETURNS void
AS $$
DECLARE
v_version VARCHAR;
BEGIN
SELECT version INTO v_version FROM version WHERE id = 1;
IF v_version <> '1.0.0.0' THEN
RAISE EXCEPTION 'This script needs Agenda version 1.0.0.0, detected
version %', v_version;
END IF;
END;
$$ LANGUAGE PLPGSQL;
I don't want, if it's possible, to create a function. I just want to
check a value stored in a table and if doesn't match the expected one
then abort the script execution.
--
Arnau
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings