[GRASSLIST:2879] problem importing from PostgreSQL
Leonardo Lami
leo.lami at katamail.com
Tue Mar 9 05:01:37 EST 2004
Hello,
I have a problem importing a vector from a database of PostgreSQL and I don't
know how resolve it.
The output message say the the coor file of the imported vector is larger than
be should (14 bytes excess) and than it terminate with:
D2/3: SQL: select count, longitud, latitud from anfibi_c_00500_count
D3/3: describe_table()
D3/3: kcols = 0
D3/3: col: count, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'count', type 0 is not supported
D3/3: col: longitud, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'longitud', type 0 is not supported
D3/3: col: latitud, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'latitud', type 0 is not supported
D3/3: row = 0 nrows = 2
D3/3: Row fetched
Segmentation fault
Down here the total report:
GRASS 5.7.-cvs:~ > v.in.db driver=pg
database="host=######,dbname=renato_copia,user=lia"
table=anfibi_c_00500_count y=latitud x=longitud key=count output=anfibi
D2/3: Vect_open_new(): name = anfibi
D1/3: Vect_set_thresh(): thresh = 0.000000
WARNING: Vector 'anfibi' already exists and will be overwritten.
D3/3: Delete vector 'anfibi'
D1/3: Vect_open_old(): name = anfibi mapset= RENATO update = 0
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: dig_spidx_init()
D1/3: open format file: 'RENATO/vector/anfibi/frmt'
D1/3: Vector format: 0 (native)
D1/3: Level request = 1
D1/3: V1_open_old_nat(): name = anfibi mapset = RENATO
D2/3: Coor header: file version 5.0 , supported from GRASS version 5.0
D2/3: byte order 0
D2/3: header size 14
D2/3: with_z 0
D2/3: coor size 0
D1/3: get coor info:
/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi/coor
D1/3: Info->size = 14, Info->mtime = 1078824292
D1/3: coor size in head = 0, real coor file size= 14
WARNING: coor files of vector 'anfibi at RENATO' is larger than it should be
(14 bytes excess).
D2/3: dig_file_load ()
D2/3: requested mode = 2
D2/3: size = 14
D2/3: file was not loaded to the memory
D1/3: Vect__read_head(): vector = anfibi at RENATO
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: Vect_open_old(): vector opened on level 1
D1/3: Vect_read_dblinks(): map = anfibi, mapset = RENATO
D1/3: dbln file: /home/Documenti/datigrass/Toscana/RENATO/vector/anfibi/dbln
D1/3: Cannot open vector database definition file
D1/3: Vect_Rewind(): name = anfibi
D1/3: Vect_close(): name = anfibi, mapset = RENATO, format = 0, level = 1
D1/3: V1_close_nat(): name = anfibi mapset= RENATO
D3/3: opendir '/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi'
D3/3: delete file
'/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi/coor'
D3/3: delete file
'/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi/head'
D3/3: delete file
'/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi/hist'
D3/3: delete directory
'/home/Documenti/datigrass/Toscana/RENATO/vector/anfibi'
D3/3: format = 0
D1/3: V1_open_new_nat(): name = anfibi
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: dig__write_head()
D1/3: write coor size (0) to head
D2/3: coor body offset 14
D1/3: dig_spidx_init()
D3/3: Vect_hist_command()
D3/3: G_recreate_command()
D1/3: Vect_default_field_info(): map = anfibi field = 1
D2/3: drv = pg db =
host=192.168.0.47,dbname=renato_copia,user=lia
D3/3: db_start_driver_open_database():
drvname = pg, dbname =
host=192.168.0.47,dbname=renato_copia,user=lia'
D3/3: db_driver_open_database() driver=pg database definition =
'host=192.168.0.47,dbname=renato_copia,user=lia'
D3/3: parse_conn :
host=192.168.0.47,dbname=renato_copia,user=lia
D3/3: token 0 : host=192.168.0.47
D3/3: token 1 : dbname=renato_copia
D3/3: token 2 : user=lia
D3/3: host = 192.168.0.47, port = (null), options = (null), tty = (null),
dbname = renato_copia, user = lia
D3/3: pgtype = 18, name = char -> type = 8
D3/3: pgtype = 21, name = int2 -> type = 1
D3/3: pgtype = 23, name = int4 -> type = 2
D3/3: pgtype = 25, name = text -> type = 0
D3/3: pgtype = 26, name = oid -> type = 4
D3/3: pgtype = 701, name = float8 -> type = 6
D3/3: pgtype = 1043, name = varchar -> type = 9
D3/3: pgtype = 1082, name = date -> type = 11
D3/3: pgtype = 1083, name = time -> type = 12
D3/3: pgtype = 1114, name = timestamp -> type = 13
D2/3: SQL: select count, longitud, latitud from anfibi_c_00500_count
D3/3: describe_table()
D3/3: kcols = 0
D3/3: col: count, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'count', type 0 is not supported
D3/3: col: longitud, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'longitud', type 0 is not supported
D3/3: col: latitud, kcols 0, pgtype : 0, sqltype 0, fsize : 0
WARNING: pg driver: column 'latitud', type 0 is not supported
D3/3: row = 0 nrows = 2
D3/3: Row fetched
Segmentation fault
I hope you resolve this problem and you can help me.
Thanks
Best regards
Leonardo Lami
More information about the grass-user
mailing list