Put simply, pastry cream is a type of custard. Adding cornstarch to the vanilla custard will give you a thick, firm substance (almost like vanilla pudding) that will hold its shape when piped. Custard that you can pour, which is only thickened with eggs, is actually called crème anglaise.