Do NOT put a common pleco in with goldfish....he will suck their sides and harass them to death if he can't latch on. They are attracted to the soft thick tastey slime coats on the goldfish's scales.
It will result in dead goldfish at worst, missing and potentially infected scales and stressed out goldies at the least.
There is a small possibility he might be alright in there for a little while, but is very small.
If you want to put a pleco in with your goldfish, the rubberlip (bulldog) and bristlenoses get along with them great for some reason....and they stay a reasonable size in an aquarium.
hth