[postgis-users] Size of .dbf file produced with pgsql2shp

strk strk at keybit.net
Thu Sep 2 01:52:03 PDT 2010


On Thu, Sep 02, 2010 at 12:48:17AM +0100, Mark Cave-Ayland wrote:
> Mark Cave-Ayland wrote:
> 
> >Ah wait a second, you're right - I've been looking in the wrong place. 
> >It looks like there is still some (old) pgsql2shp code which hasn't been 
> >updated to use the new error handling, and hence it doesn't get 
> >propagated back up to the main function correctly :(  Will fix later, as 
> >I have to head out now.
> 
> Okay - I've just committed a better fix as r5892 which makes sure that 
> in the case of a 0 row result, pgsql2shp will terminate returning an 
> error code of 1 (failure) as opposed to 0 (success) when dumping tables 
> into shapefiles (serves me right for trying to fix things in a rush when 
> I'm just about to head out). Denis, please can you try again after an 
> "svn up"?

Just to stress my point out, I was suggesting NOT to look at 
number of rows to tell success/failure.

Granted, pgsql2shp is currently unable to produce a 0-row
valid shapefile, but maybe such thing exists.

It is fine for me throwing different non-zero return codes
for different errors. Just I think this error is:

	"Can't determine geometry type"

and not:

	"There are no rows"

Clearer now ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-users mailing list