[GRASS-dev] table only creation in v.in.ascii

Martin Landa landa.martin at gmail.com
Thu Jan 10 10:27:04 EST 2008


hi,

the patch is for svn-trunk?

$ patch -p0 < ~/temp/v.in.ascii.patch
patching file v.in.ascii/description.html
patching file v.in.ascii/in.c
Hunk #3 FAILED at 164.
Hunk #4 succeeded at 187 (offset 1 line).
Hunk #6 succeeded at 289 (offset 1 line).
Hunk #8 succeeded at 444 (offset 1 line).
Hunk #10 succeeded at 479 (offset 1 line).
Hunk #12 succeeded at 589 (offset 1 line).
Hunk #14 succeeded at 655 (offset 1 line).
1 out of 15 hunks FAILED -- saving rejects to file v.in.ascii/in.c.rej
patching file v.in.ascii/local_proto.h
patching file v.in.ascii/points.c

Martin

2008/1/10, Benjamin Ducke <benjamin.ducke at ufg.uni-kiel.de>:
> OK, this seems to be a useful hint, so here it goes again:
>
> Martin Landa wrote:
> > hi,
> >
> > it is better to create one diff file instead of bunch of them, e.g.
> >
> > svn diff vector/v.in.ascii > v-in-ascii.diff
> >
> > sorry for bothering you:-)
> >
> > Martin
> >
> > 2008/1/10, Benjamin Ducke <benjamin.ducke at ufg.uni-kiel.de>:
> >> Alright, here is the patches vor v.in.ascii.
> >>
> >> Cheers,
> >>
> >> Benjamin
> >>
> >> Benjamin Ducke wrote:
> >>> Unfortunately, it returns DB_OK.
> >>> There seems to be some caching going on which I don't quite
> >>> understand at the moment.
> >>> Starting and stopping the db driver in the right sequence seems
> >>> to be important.
> >>> Anyway, I solved the problem by doing the deletion at an earlier
> >>> point in the program.
> >>>
> >>> Everything seems to work OK now. I'll do some tests with more
> >>> complex tables, then post a patch.
> >>>
> >>> Benjamin
> >>>
> >>> Moritz Lennert wrote:
> >>>> On 10/01/08 13:52, Benjamin Ducke wrote:
> >>>>> OK, I have it almost working except for one annoyance:
> >>>>>
> >>>>> If the table already exists, then --o should allow the user to
> >>>>> overwrite it. Thus, I check for that flag and delete the old
> >>>>> table, if it exists, using:
> >>>>>
> >>>>>   db_delete_table ( connection.driverName, connection.databaseName,
> >>>>>                     new->answer );
> >>>>>
> >>>>> But even so, the next call to
> >>>>>
> >>>>>   db_execute_immediate()
> >>>>>
> >>>>> complains about the table still being there and creation of the
> >>>>> new table fails.
> >>>>> I suppose that db_delete_table() does not delete the table immediately?
> >>>> db_delete_table() sends a "drop table XYZ" sql query to the database
> >>>> backend, so it should delete the table.
> >>>>
> >>>> Launching
> >>>>
> >>>> echo "drop table ggg" | db.execute
> >>>> followed by
> >>>> echo "create table ggg (cat int, value double)" | db.execute
> >>>>
> >>>> works without a problem.
> >>>>
> >>>> What does db_delete_table return ?
> >>>>
> >>>> Moritz
> >>>>
> >>>> _______________________________________________
> >>>> grass-dev mailing list
> >>>> grass-dev at lists.osgeo.org
> >>>> http://lists.osgeo.org/mailman/listinfo/grass-dev
> >>>>
> >>>>
> >> --
> >> Benjamin Ducke, M.A.
> >> Archäoinformatik
> >> (Archaeoinformation Science)
> >> Institut für Ur- und Frühgeschichte
> >> (Inst. of Prehistoric and Historic Archaeology)
> >> Christian-Albrechts-Universität zu Kiel
> >> Johanna-Mestorf-Straße 2-6
> >> D 24098 Kiel
> >> Germany
> >>
> >> Tel.: ++49 (0)431 880-3378 / -3379
> >> Fax : ++49 (0)431 880-7300
> >> www.uni-kiel.de/ufg
> >>
> >>
> >> _______________________________________________
> >> grass-dev mailing list
> >> grass-dev at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/grass-dev
> >>
> >>
> >
> >
>
> --
> Benjamin Ducke, M.A.
> Archäoinformatik
> (Archaeoinformation Science)
> Institut für Ur- und Frühgeschichte
> (Inst. of Prehistoric and Historic Archaeology)
> Christian-Albrechts-Universität zu Kiel
> Johanna-Mestorf-Straße 2-6
> D 24098 Kiel
> Germany
>
> Tel.: ++49 (0)431 880-3378 / -3379
> Fax : ++49 (0)431 880-7300
> www.uni-kiel.de/ufg
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
>


-- 
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-dev mailing list