zsqlprocessor problem with postgresql
Posted: 30.09.2007, 14:56
I am new user of Postgresql and ZeosLib. The problem is that Im trying to change DDL of my database using Zsqlprocessor
Actually, trying to create the function bellow.
CREATE OR REPLACE FUNCTION ano_mes_b_ins_f()
RETURNS "trigger" AS
$BODY$
BEGIN
IF NEW.mes is not null THEN
IF (NEW.mes<1) or (NEW.MES> 12) THEN
raise exception 'O campo mes deve ser um valor valido(entre 1 e 12)';
END IF;
END IF;
END;
$BODY$
LANGUAGE 'plpgsql';
Using the "pgAdmin II" it works well but with zsqlprocessor comes up with the massage below:
"Sql error:ERROR unterminated dollar_quoted at or near "$BODY"
So any help is good. Thanks any way....
Actually, trying to create the function bellow.
CREATE OR REPLACE FUNCTION ano_mes_b_ins_f()
RETURNS "trigger" AS
$BODY$
BEGIN
IF NEW.mes is not null THEN
IF (NEW.mes<1) or (NEW.MES> 12) THEN
raise exception 'O campo mes deve ser um valor valido(entre 1 e 12)';
END IF;
END IF;
END;
$BODY$
LANGUAGE 'plpgsql';
Using the "pgAdmin II" it works well but with zsqlprocessor comes up with the massage below:
"Sql error:ERROR unterminated dollar_quoted at or near "$BODY"
So any help is good. Thanks any way....