You can not get pregnant from a cucumber*.
It doesn’t matter if you eat the cucumber, mash the cucumber up and give yourself a facial, or have really hot sex with the cucumber – vegetables can not get you pregnant.
Explanation for why you can not get pregnant with a cucumber:
Cucumbers don’t have sperm. Without sperm, you can not get pregnant.
For that matter, if a cucumber did have sperm (instead of seeds), it would be cucumber sperm and cucumbers and humans are incapable of cross-breeding. It would take some serious genetic engineering (or a lot of booze…) to make pickled people!
Technically speaking, I suppose that if a man hollowed out a cucumber, jerked off into it so that it was filled with his semen, and then fucked a woman with it, that it is possible that she could get pregnant… but it seems both like an awful lot of trouble and a waste of a perfectly good salad. Plus, it would still be the man getting her pregnant – not the cucumber.
*Someone asked. I swear!