Opened 4 years ago

Closed 11 months ago

#2743 closed defect (wontfix)

[raster]: postgis.gdal_datapath not working (windows 9.4 64-bit)

Reported by: robe Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.4.0
Component: raster Version: trunk
Keywords: windows Cc:


I thought I had tried this on lower before but perhaps not. I very well might be doing something really stupid.

I tried doing this:

ALTER DATABASE testpostgis22
  SET postgis.gdal_datapath = 'C:/ming64gcc48/projects/postgresql/rel/pg9.4w64gcc48edb/gdal-data';

Which is where I think my path is and it seems to just ignore it. Get the GDAL Data not found error. Tried also setting at session level and doesn't seem to do anything.

So back to setting in my batch script:

@SET GDAL_DATA=%~dp0\gdal-data

I'll check my 9.3.

The other GUC variables work fine even with using the new ALTER SYSTEM feature. So doesn't seem to be anything wrong with the GUC machinery.

ALTER SYSTEM SET postgis.gdal_enabled_drivers TO 'ENABLE_ALL';

If you are not seeing an issue, I'll confirm to make sure I didn't make any typos or it's not the direction of / which is different when I set in batch script.

Change History (9)

comment:1 Changed 4 years ago by robe

Summary: [raster]: postgis.gdal_path not working (windows 9.4 64-bit)[raster]: postgis.gdal_datapath not working (windows 9.4 64-bit)

comment:2 Changed 4 years ago by Bborie Park

Does this work in 9.3? I haven't tested 9.4 yet. Oh... debug? I think there are debug output.

comment:3 Changed 4 years ago by robe

That's what I was going to try next. It's quite possible I never tried that variable since I have the GDAL_DATA embedded in my batch scripts.

I thought it is supposed to override the environment variable. Even if I have the postgis.gdal_datapath GUC set, as long as I have my GDAL_DATA variable set, it works fine.

comment:4 Changed 3 years ago by Bborie Park

robe, is this still valid?

comment:5 Changed 3 years ago by robe

Milestone: PostGIS 2.2.0PostGIS 2.3.0

Yes. I think for now I just can't rely on the postgresql gdal_path GUC for windows for the data path setting. Which is fine. The others seem to work fine which is more important.

People will have issue anyway using raster2pgsql if they don't have a gdal_data path set so I think I still need to set it in the installer using env.

comment:6 Changed 2 years ago by pramsey

I've attempted to address the GUC redefinition problem in r14680

comment:7 Changed 2 years ago by strk

Does not fix #3429 (not sure it was intended to)

comment:8 Changed 2 years ago by robe

Milestone: PostGIS 2.3.0PostGIS 2.4.0

comment:9 Changed 11 months ago by robe

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.