[postgis-users] Help resolving raster2pgsql error

Regina Obe lr at pcorp.us
Tue Jun 22 18:19:15 PDT 2021


> On Wed, 23 Jun 2021 at 08:32, Ben Boughton <bboughton at gmail.com> wrote:
> > Processing 1/1: testr.tif
> > ERROR 1: PROJ: proj_as_wkt: SQLite error on SELECT name,
> > ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name,
> > prime_meridian_code, area_of_use_auth_name, area_of_use_code,
> > publication_date, deprecated FROM geodetic_datum WHERE auth_name = ?
> > AND code = ?: no such column: area_of_use_auth_name
> 
> You might have PROJ_LIB pointing to a different version of PROJ, as the
schema
> in proj.db has changed a few times between releases.
> 
> https://proj.org/usage/environmentvars.html#envvar-PROJ_LIB
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
[Regina Obe] 

As Mike noted, proj.db has changed a number of times in proj releases.
Last person I ran into with this particular problem was because they got
their proj from main distro
And they had installed QGIS/GDAL via UbuntuGIS which installed a newer
version of proj. So they had two versions of proj, but the proj.db path was
the newer.

It was a mess to properly fix the install, so I ended up just giving him my
copy of proj.db to overwrite his.

Lesson: Don't mix distributions of GDAL/PROJ.  Bad things happen.

You can check which version of Proj your postgis is running with 

SELECT postgis_full_version();

And whatever proj that says you should be using a proj.db that was built
from that one.
I've got a bunch of versions of proj hanging around, so I could give you my
copy of proj.db for your version of Proj, if it comes to that.

Hope that helps,
Regina





More information about the postgis-users mailing list