Opened 11 years ago

Closed 10 years ago

#2230 closed defect (fixed)

pgsql2shp fails with named schema on windows 64

Reported by: robe Owned by: robe
Priority: critical Milestone: PostGIS 2.0.4
Component: loader/dumper Version: 2.0.x
Keywords: windows64 Cc:


This is a note from Jeff:

I just tested and confirmed its the same issue with 2.0.3. I think we had a similar issue a while back with shp2pgsql and perhaps because that is more heavily tested it was caught there.

pgsql2shp -f "c:/test.shp" -g geom -u "postgres" -h t -p 5432 -P "mypassword" mygisdb public.constrained_geoms

The is is the . is being put in the wrong spot this is what the log shows:

SELECT a.attname, a.atttypid, a.atttypmod, a.attlen FROM pg_attribute a, pg_class c, pg_namespace n WHERE n.nspname = 'public.' AND a.attrelid = c.oid AND n.oid = c.relnamespace AND a.atttypid != 0 AND a.attnum > 0 AND c.relname = 'constrained_geoms'

note the public. instead of public

Change History (12)

comment:1 by robe, 11 years ago

Problem might be related to this one:


Thought that was on 32-bit. I guess I better check to make sure I am disabling gettext. Perhaps the shp2pgsql is broken too on 64-bit though I don't think so since I think I've been happily loading tiger files into named schemas without issue.

comment:2 by robe, 11 years ago

Component: postgisloader/dumper
Owner: changed from pramsey to mcayland

comment:3 by robe, 11 years ago

Well this is interesting. I would expect the 64-bit shp2pgsql-gui to have the same issue with exporting, but it works fine.

comment:4 by mcayland, 11 years ago

Thanks for the bug report guys. Can it be reproduced on Linux as well as Windows? The only reason I ask is that I don't currently have a Windows build environment set up - Regina, if necessary would it be possible to have remote access to Winnie?

comment:5 by robe, 11 years ago


Unfortunately not (since she's running other thigns) — though she is set to automatically build 2.0 branch whenever there is a change, so if you can add a regress test to test the behavior, she'll fail/pass.

comment:6 by robe, 11 years ago


FWIW - she uses these build scripts —

I'll double-check to make sure she's pulling the latest each time.

You have admin rights to her jenkins console do you — if not I can reset your password.

comment:7 by robe, 10 years ago

I'll try to tackle this one sometime this weekend probably. I suspect its probably something to do with includes and some how the gettext stuff being mashed since the issue doesn't seem to happen with the shp2pgsql-gui which in theory should suffer the same problem since it uses the same base library.

comment:8 by robe, 10 years ago

Owner: changed from mcayland to robe

comment:9 by robe, 10 years ago

fixed for 2.0 at r11708. We probably should have a regress test to check this, but haven't created one yet (and not quite sure how). Will close once I've also patched 2.1 and trunk (2.2) branches.

comment:10 by robe, 10 years ago

It appears I changed more that I intended since I took the one from 2.1 chain. However I think the additional change is harmless and probably easier to keep for ease of future patching.

comment:11 by robe, 10 years ago

fixed for 2.1 at r11709

comment:12 by robe, 10 years ago

Resolution: fixed
Status: newclosed

fixed for 2.2 at r11710. I'm going to close this out and create another ticket for actually testing pgsql2shp. Seems we don't have one as far as I can tell.

Note: See TracTickets for help on using tickets.