A SRID of 0 is also assigned when you don't specifically assign one. I recall a debate among the Postgis developers as to whether a missing SRID should be reported as -1 or 0. I was in favour of -1, 0 was chosen. If you look at the definition of the geometry_columns view you will discover a function, typemod_get_srid, which appears to be the culprit, see ` #define TYPMOD_SET_SRID(typmod, srid) ((typmod) = (((typmod) & 0xE00000FF) | ((srid & 0x001FFFFF)<<8))) `
– John PowellDec 15 '17 at 14:57

2 Answers
2

Based on PostGIS website, 4326 used to be the only supported CRS for geography types, but not any more:

Prior to PostGIS 2.2, the geography type only supported WGS 84 long
lat (SRID:4326). For PostGIS 2.2 and above, any long/lat based spatial
reference system defined in the spatial_ref_sys table can be used. You
can even add your own custom spheroidal spatial refence system as
described in geography type is not limited to earth.

While what laser says is true, I believe the reason for the SRID appearing as 0 is due to a decision made by Postgis developers that an undefined SRID should be reported as 0 -- there was a debate, in which -1 was also suggested. (I know this because I took part in said debate on IRC, and favoured -1, as it think it is more obviously undefined than 0).

It is easy enough to confirm this by creating a geography column and then looking at geography_columns. Given that you could also create a geometry column with any custom spheroid, it seems a bit pointless to allow this functionality in the geography type, given the prevalence of WGS84.