Goldfish tend to dirty the water quite fast as they have a higher bioload. Any tank with goldfish should have partial water changes more frequently The Pleco is a tropical fish which may require higher temperatures while the goldfish is a cold water fish.
Some aquarium keepers have mentioned incidents where plecos have clasped the goldfish and have sucked at the slime coat. This, however, is very rare. Feed your Plecos and gold fish properly. Plecos can be given vegetables such as cucumber, zucchini,etc.
Also provide plenty of hiding places for the pleco to rest during the day. They are nocturnal fish. This reduces stress and minimizes conflict. Another important factor you should look at is space. Both Plecos and Goldfish can grow very big. Housing both in a small tank creates the ground for conflict.
Ensure that both the fish have their own individual space and are well fed if you decide to keep them together.