Closed nagylzs closed 4 years ago
Command line was:
/usr/bin/pg_format --wrap-after 5 ${file}
pg_format version was 4.1
I think the problem is that "VALUES" is also a keyword, but it is used as a variable name inside the code. Probably this is not something that should be addressed in pg_formatter. I think it should be forbidden by PostgreSQL itself.
Yes got it this morning too in a different code but I think this the same problem:
CREATE FUNCTION tg_phone_bu ()
RETURNS TRIGGER
AS $$
BEGIN
IF new.slotname != old.slotname THEN
DELETE FROM PHone
WHERE slotname = old.slotname;
INSERT INTO PHone (slotname, COMMENT,
slotlink)
VALUES (new.slotname,
new.comment,
new.slotlink);
RETURN NULL;
END IF;
RETURN new;
END;
$$
LANGUAGE plpgsql;
Fixed in latest development code with commits84e7728 and fe92cb4.
It is formatted as shown above. The " values = array_append" line does not have an ident.