[postgis-users] tool to load dbf into postgresql table

Richard Greenwood richard.greenwood at gmail.com
Mon Jan 30 06:22:04 PST 2012


It's been around for years. Since 1.4 I'd guess. When you type shp2pgsql
you should see this option:
   -n  Only import DBF file.
The OP was how to load a dbf into postgres, you're exporting with
pgsql2shp, which will export only the dbf if there is not geometry column
in the table being exported.

Rich


On Sun, Jan 29, 2012 at 9:39 PM, <pcreso at pcreso.com> wrote:

> When did this become available?
>
> I'm using pgsql2shp from Postgis version 1.5.3 for Linux, which is pretty
> current, and that is not a listed command line option.
>
> Cheers,
>
>    Brent Wood
>
> --- On *Mon, 1/30/12, Richard Greenwood <richard.greenwood at gmail.com>*wrote:
>
>
> From: Richard Greenwood <richard.greenwood at gmail.com>
> Subject: Re: [postgis-users] tool to load dbf into postgresql table
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Monday, January 30, 2012, 3:55 PM
>
> On Sun, Jan 29, 2012 at 7:17 PM, John Morgan <jdmorgan at unca.edu<http://mc/compose?to=jdmorgan@unca.edu>>
> wrote:
> > Hello,
> > This may be more of a postgresql question, but it is related to my
> postgis
> > setup.  I was hoping that someone might know of an easy way to load a dbf
> > into postgresql table.  I have used the gdal tool shp2pgsql to load a
> > shapefile in this way and it worked great.  Is there a similar tool for
> > loading just a dbf?
> >
> > Thanks,
> > Derek
>
> Derek,
>
> Use the -n switch with shp2pgsql will do what you want:
>    shp2pgsql -n
> Also ogr2ogr will do the trick. ogr2ogr can also handle conversions
> between numerous other spatial and non-spatial data formats. ODBC is
> especially handy.
>
> Rich
>
> --
> Richard Greenwood
> richard.greenwood at gmail.com<http://mc/compose?to=richard.greenwood@gmail.com>
> www.greenwoodmap.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net<http://mc/compose?to=postgis-users@postgis.refractions.net>
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>


-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120130/f2171e2e/attachment.html>


More information about the postgis-users mailing list