Postgres Function to Validate Email Address

前端 未结 6 2114
伪装坚强ぢ
伪装坚强ぢ 2021-01-02 09:30

A check constraint which would call a function to validate email addresses is not working fine for me.

CREATE OR REPLACE FUNCTION f_IsValidEmail(text) return         


        
6条回答
  •  盖世英雄少女心
    2021-01-02 09:56

    If you can figure out a regular expression that matches email addresses to your satisfaction, consider whether it might not be more useful as a domain rather than a check constraint.

    For some of the pitfalls see regular-expressions.info.

提交回复
热议问题