In a medium saucepan, combine sugar, cornstarch and salt. Gradually stir in milk until smooth. Cook over medium heat, stirring constantly, until mixture thickens and boils. Boil and stir for 1 minute.
Remove from heat. Gradually stir at least half of the hot mixture into egg yolks; blend well. Stir egg yolk mixture back into remaining hot mixture in saucepan; bring to a gentle boil. Boil and stir for 1 minute.
Remove from heat; stir in butter and vanilla extract.
Pour hot filling into pastry shell. Cover with plastic wrap; chill.