[GRASSLIST:8859] Re: switching to postgres
Kirk R. Wythers
kwythers at umn.edu
Thu Nov 3 11:05:58 EST 2005
On Oct 31, 2005, at 2:49 AM, Radim Blazek wrote:
> On 10/28/05, Stephan Holl <holl at gdf-hannover.de> wrote:
>
>> AFAIK the database needs to be created before. If you would just
>> copying your existing tables to PG, you should consider using db.copy
>> and reconnect the newly created tables in PG with your dataset (with
>> v.db.connect)
>>
>
> Or
> g.copy vect=
> g.remove vect=
>
Radim,
Can you expand on this idea using g.copy? I tired db.copy with the
command:
GRASS 6.1.cvs (arrowhead_utm):~ > db.copy from_driver=dbf
from_database=./ from_table=townships to_driver=pg
to_database="host=localhost,dbname=ts2325" to_table=townships
and got the error:
DBMI-DBF driver error:
Table 'townships' doesn't exist.
Error in db_open_select_cursor()
WARNING: Cannot open select cursor: 'select * from townships where 0
= 1'
WARNING: Copy table failed
These messages imply that I need to create the Table
"townships" (including all the columns and data typoes) before I can
copy it from dbf. I was hoping to simply copy all the columns from
the old dbf table to the new pg table
More information about the grass-user
mailing list