[postgis-users] pgsql2shp can't handle WITH

Regina Obe lr at pcorp.us
Wed Nov 10 12:01:34 PST 2021


> -----Original Message-----
> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
> Behalf Of Jonathan Schultz
> Sent: Saturday, November 6, 2021 7:38 PM
> To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
> Subject: Re: [postgis-users] pgsql2shp can't handle WITH
> 
> >  > $ pgsql2shp ... "WITH foo AS (SELECT 2) SELECT 1"
> >  > Table WITH foo AS (SELECT 2) SELECT 1 does not exist
> 
> I found a work-around:
> 
> > $ pgsql2shp ... "SELECT * FROM (WITH foo AS (SELECT 2) SELECT 1) bar"
> > Initializing...
> > Done (postgis major version: 3).
> > Output shape: Null Shape
> > Dumping: X [1 rows].
> 
> 
[Regina Obe] 

Great you found a workaround.  Yap it looks like the code explicitly looks
for SELECT to determine if it is a query or  table.

I've ticketed this one:

https://trac.osgeo.org/postgis/ticket/5018

Thanks,
Regina



More information about the postgis-users mailing list