[GRASSLIST:1818] Re: db.copy
Radim Blazek
blazek at itc.it
Wed Nov 19 11:16:11 EST 2003
On Wednesday 19 November 2003 11:50, Miha STAUT wrote:
> >On Monday 17 November 2003 16:19, Miha STAUT wrote:
> > > Hi,
> > >
> > > Why is the following command wrong? The opposite way works without
> >
> >problem.
> >
> > > GRASS 5.7.0-cvs:/home/ines > db.copy from_driver=pg
> > > from_database=dbname=nuts\
> > > from_table=dejanja to_driver=dbf to_database=./ to_table=dej
> > > dbmi: Protocol error
> > > WARNING: Cannot create new table: 'create table dej ( ks_ime_d
> >varchar(-5),
> > > 127 integer, 129 integer, 133 integer, 134 integer, 135
> >
> >What '\d dejanja' in psql says?
>
> Table "dejanja"
> Column | Type |
> -------------+---------+-
> ks_ime_ | text |
> 127 | integer |
There are 2 problems in this case,
1) type 'text' is not supported by pg driver, recently you should get a warning:
WARNING: pg driver: column 'ks_ime_', type 0 is not supported
2) dbf driver doesn't support column names beginning with a digit,
in fact until today, I did not know that postgres does, also
Postgres manual says "SQL identifiers and key words must begin
with a letter (a-z) or underscore (_)."
Radim
More information about the grass-user
mailing list