[GRASS-dev] db function needed to check if column exists in table

Glynn Clements glynn at gclements.plus.com
Mon Jan 30 13:18:23 EST 2012


Markus Metz wrote:

> >>>     db_get_column(driver, hcolumn,key, &column);
> >>>     if (!column)
> >>>         G_fatal_error(_("Missing column <%s> in table <%s>"), hcolumn, table);
> >>>
> >
> > in this case you would probably need to close DB connection before
> > calling G_fatal_error(). Probably candidate for new error handler (see
> > [1]) which would close DB connections, close input vector map, and
> > delete output vector map.
> 
> There are hundreds of places where G_fatal_error() is called without
> closing DB connections. I would rather have the spawning fixed such
> that sub-processes are closed if the calling process is closed. This
> is working fine on Linux, but not on Windows.

Agreed. An error handler won't help if the process terminates on a
signal.

r50563 (hopefully) solves another potential issue, but I don't know
whether it's "the" issue; I don't think that any of us are
particularly "fluent" with the Windows API.

Ultimately, Windows support will depend upon people who are both able
and willing to develop and debug on Windows. And it sometimes seems to
be an either-or thing; those who can program have working Linux/Mac
systems (and prefer to use them), while those who use Windows
exclusively tend not to be programmers.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list