In my research, I have encountered a baptism record that indicates a child (possibly my 3rd G-grandfather) was abandoned at the house of a woman in Guadalajara in 1781. The record provides the child's first and middle names but omits any mention of parents or even godparents. At some later time, the child would have been given a surname. Was this name assigned by the Church? Or, if the child's father eventually stepped up and acknowledged the child as his, how would the family name be established: by Church action or by civil action? Where (if anywhere) would such action be recorded? Thanks for any assistance you can provide with my request.