Is there was a way to convert a
geography value to a 3D
geometry value (in ECEF, for example), and vice versa? I know how to convert between
geography using a 2D projection, but not a 3D reference frame.
Well, how about simply using a 3D CRS then?
EPSG:4978 is an ECEF CRS based on
EPSG:4326 and in widespread use as the core (3D) CRS for the GPS system.
ALTER TABLE <table> ALTER COLUMN geom TYPE GEOMETRY(<TYPE>, 4978) USING ST_Transform(ST_Force3D(<geog>::GEOMETRY, 4978)) ;
should give you meter based XYZ (ECEF) coordinates of your points.