Welcome to the forum Ray. If it serves the same purpose on the diesel as gas and I'm sure they are semiliar it could give all kinds of problems according to what position the TPS was in when the problem occures. What kind of problem do you have?
What year and engine do you have? If you have a mechanical engine then it is very common. You should be able to get codes from the trans to tell you what the causes are. I had to replace mine and some of the symptoms where, D would flash and not go into gear, harsh up shifts and down shifts and once I even got a Do Not Shift Light. It could be a bad switch or another problem is that the pin on the linkage where the TPS conects breaks or is binding. Give me some more info and I will be glad to help. Good Luck