Placing a pumpkin with nothing underneath it to support it is known not to be allowed. I can take that as a quirk of the game, even though I find it annoying. But I can't see any reason why placing pumpkins on top of a nice sturdy cobblestone fence post shouldn't be possible, or on a block of glass, and it isn't, merely because in-game these are both transparent blocks. Given that you can work around it in most cases by placing a dirt block, placing a pumpkin, removing the dirt, then inserting the forbidden support block type, just what on Earth is the point of imposing this arbitrary restriction in the first place? It just slows people down when they want to build things using pumpkins.