> > $ 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].