Re: help with version checking
| От | Arnau |
|---|---|
| Тема | Re: help with version checking |
| Дата | |
| Msg-id | 45940403.4010909@andromeiberica.com обсуждение исходный текст |
| Ответ на | help with version checking (Arnau <arnaulist@andromeiberica.com>) |
| Ответы |
Re: help with version checking
|
| Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: