[postgis-users] pgsql2shp can't handle WITH

Jonathan Schultz jonathan at schultz.la
Sat Nov 6 05:10:46 PDT 2021


Hello,

While attempting to use pgsql2shp with some queries I found that it 
seems to struggle with WITH clauses. For a trivial example:

 > $ pgsql2shp ... "WITH foo AS (SELECT 2) SELECT 1"
 > Table WITH foo AS (SELECT 2) SELECT 1 does not exist

whereas psql handles the same query as expected:

 > $ psql ... -c "WITH foo AS (SELECT 2) SELECT 1"
>  ?column? 
> ----------
>         1
> (1 row)

Can anyone shed some light on this?

Thanks,
Jonathan


More information about the postgis-users mailing list