Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION importrate.check_ticker_suid_spaces()
- RETURNS trigger AS
- $BODY$
- BEGIN
- IF new.suid!=trim(new.suid) THEN
- RAISE EXCEPTION 'Unable to set ticker suid with spaces';
- END if;
- RETURN new;
- END;
- $BODY$
- LANGUAGE plpgsql VOLATILE
- COST 100;
- CREATE TRIGGER check_ticker_suid_spaces_trigger
- BEFORE UPDATE OR INSERT
- ON importrate.tickers
- FOR EACH ROW
- EXECUTE PROCEDURE importrate.check_ticker_suid_spaces();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement