[postgis-users] pgsql2shp varchar convert
strk at refractions.net
strk at refractions.net
Wed Nov 15 00:03:46 PST 2006
On Tue, Nov 14, 2006 at 12:58:06PM -0300, Richard Rossel wrote:
> Hi guys,
> I have a problem with pgsql2shp convertion that I would like that you
> help me :)
> I have a postgres DB with data that I loaded with shp2pgsql, and then
> I make some transformations and added a new field call FCC as a varchar(5)
> and load data as: UPDATE tablename SET FCC='A31' .....;
> Can I do some queries and check that it is correct:
> Select FCC from tablename;
> FCC = A31
>
> The problem is when I convert bd to shapefile using pgsql2shp the FCC data
> is saved with quotes that I no need, like:
> FCC = 'A31'
This would be a bug.
Add a statemtn:
printf("Value: [%s]\n", val);
on line 3467 of pgsql2shp to see what's happening (1.1.5)
> And other question :)
> How can filter fields with shp2pgsql, like "ogr2ogr -selec" does?
You can load to a temp table and then filter with SQL queries..
--strk;
More information about the postgis-users
mailing list