vendredi 19 décembre 2014

Get columns from NEW when execute update on postgresql


I need know if determide fields are into result of update execution, e.g.



IF NEW.niveope is null THEN
_new_nivope := 0;
ELSE
_new_nivope := NEW.nivope;
END IF;


When I execute:



EXPLAIN ANALYZE UPDATE operador SET cad_apoio_co=0 where id=5;


I get the result message: ERRO: registro "new" não tem campo "niveope" or something like ERROR: "new" not have "niveope"


Are possible validate if "NEW" contains or not a especific field before use it?


Thanks





Aucun commentaire:

Enregistrer un commentaire