<commit_before>-- Column: codice_fiscale

-- ALTER TABLE member DROP COLUMN codice_fiscale;
BEGIN;

ALTER TABLE member ADD COLUMN codice_fiscale character varying(16);
COMMENT ON COLUMN member.codice_fiscale IS 'Italian tax identification number (Codice fiscale)';
-- Function: codice_fiscale_insert_trigger()

-- DROP FUNCTION codice_fiscale_insert_trigger();

CREATE OR REPLACE FUNCTION codice_fiscale_insert_trigger()
  RETURNS trigger AS
$BODY$
    DECLARE myrec int;
    BEGIN
       myrec = length (NEW.codice_fiscale);
       
       IF myrec = 16 THEN
		--NEW.campo= 'ok';
		RETURN NEW;
	ELSE
		RAISE EXCEPTION 'Lunghezza non permessa';
      END IF;
      RETURN NULL;
         
   END;

$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;

-- Trigger: codice_fiscale_validation on member

-- DROP TRIGGER codice_fiscale_validation ON member;

CREATE TRIGGER codice_fiscale_validation
  BEFORE INSERT OR UPDATE
  ON member
  FOR EACH ROW
  EXECUTE PROCEDURE check_codice_fiscale();


COMMIT;<commit_msg>Wrong procedure call modified:   update/core-update.v2.2.1-m5s2.2.1-0.1.sql<commit_after>-- Column: codice_fiscale

-- ALTER TABLE member DROP COLUMN codice_fiscale;
BEGIN;

ALTER TABLE member ADD COLUMN codice_fiscale character varying(16);
COMMENT ON COLUMN member.codice_fiscale IS 'Italian tax identification number (Codice fiscale)';
-- Function: codice_fiscale_insert_trigger()

-- DROP FUNCTION codice_fiscale_insert_trigger();

CREATE OR REPLACE FUNCTION codice_fiscale_insert_trigger()
  RETURNS trigger AS
$BODY$
    DECLARE myrec int;
    BEGIN
       myrec = length (NEW.codice_fiscale);
       
       IF myrec = 16 THEN
		--NEW.campo= 'ok';
		RETURN NEW;
	ELSE
		RAISE EXCEPTION 'Lunghezza non permessa';
      END IF;
      RETURN NULL;
         
   END;

$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;

-- Trigger: codice_fiscale_validation on member

-- DROP TRIGGER codice_fiscale_validation ON member;

CREATE TRIGGER codice_fiscale_validation
  BEFORE INSERT OR UPDATE
  ON member
  FOR EACH ROW
  EXECUTE PROCEDURE codice_fiscale_insert_trigger();


COMMIT;
{'fraction_non_alphanumeric': 0.07002398081534772, 'fraction_numerical': 0.011031175059952039, 'mean_word_length': 3.7844036697247705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1358091', 'n_tokens_mistral': 798, 'n_tokens_neox': 746, 'n_words': 203}