Hello,
I am creating a web application in which registrations are open as usual. My doubt is, if some one try to create an account by an email-id like 'foo@gmail.com' , at same time other user also try to create account by same emailid 'foo@gmail.com' , what will happen in this case? I have added a validation to check the duplicate email-id in the database before insert and update in my script but i am thinking if both request submitted on same time then what will happen? will PostgreSQL add both records into the table? Please suggest me how to handle such situations?
I heard that such type of problem can be prevent by row locking. Could you please help me to sort out it?
Mangal Kumar
I am creating a web application in which registrations are open as usual. My doubt is, if some one try to create an account by an email-id like 'foo@gmail.com' , at same time other user also try to create account by same emailid 'foo@gmail.com' , what will happen in this case? I have added a validation to check the duplicate email-id in the database before insert and update in my script but i am thinking if both request submitted on same time then what will happen? will PostgreSQL add both records into the table? Please suggest me how to handle such situations?
I heard that such type of problem can be prevent by row locking. Could you please help me to sort out it?
Mangal Kumar
Comment