Could anyone help me on how to perform validation on SSN, Email, phon开发者_JAVA百科e through a stored procedure in Postgresql?
Thanks.
A stored procedure doesn't look like the right solution. Use a domain with a check constraint using pattern matching. There is an example on the CREATE DOMAIN reference page. For email address checking, consider http://wiki.postgresql.org/wiki/Email_address_parsing.
精彩评论