Context. Individual distances to planetary nebulae are of the utmost relevance for our understanding of post-asymptotic giant-branch evolution because they allow a precise determination of stellar and nebular properties. Also, objects with individual distances serve as calibrators for the so-called statistical distances based on secondary nebular properties. Aims. With independently known distances, it is possible to check empirically our understanding of the formation and evolution of planetary nebulae as suggested by existing hydrodynamical simulations. Methods. We compared the expansion parallaxes that have recently been determined for a number of planetary nebulae with the trigonometric parallaxes provided by the Gaia Data Release 2. Results. Except for two out of 11 nebulae, we found good agreement between the expansion and the Gaia trigonometric parallaxes without any systematic trend with distance. Therefore, the Gaia measurements also prove that the correction factors necessary to convert proper motions of shocks into Doppler velocities cannot be ignored. Rather, the size of these correction factors and their evolution with time as predicted by 1-D hydrodynamical models of planetary nebulae is basically validated. These correction factors are generally greater than unity and are different for the outer shell and the inner bright rim of a planetary nebula. The Gaia measurements also confirm earlier findings that spectroscopic methods often lead to an overestimation of the distance. They also show that even modelling of the entire system of star and nebula by means of sophisticated photoionisation modelling may not always provide reliable results. Conclusions. The Gaia measurements confirm the basic correctness of the present radiation-hydrodynamics models, which predict that both the shell and the rim of a planetary nebula are two independently expanding entities, created and driven by different physical processes, namely thermal pressure (shell) or wind interaction (rim), both of which vary differently with time.