[GRASS5] data type numeric and DBMI
Martin Landa
landa at gama.fsv.cvut.cz
Wed Jun 1 05:46:47 EDT 2005
Hi Radim,
first of all, thanks for your replay.
> >The problems:
> >
> >a) GRASS DBMI doesn't support the data type bigint.
> > Solution: to add this support for relevant drivers (pg,...)
>
> The problem is that it isn't enough to change just a driver, the changes
> must be done in the DBMI library (dbValue structure and data types) and
> that would break compatibility.
> Also i don't know how to work with 8 bytes integer in ANSI C, AFAIK C
> guarantees only that char is 1 byte.
Nevertheless, I hope there is a way how to support other data types like bigint, numeric
(specific for relevant database system (e.g. bigint and pg)...
I am not sure how to do it - I am a beginner.
> >b) All numerics are determined as *double*.
> > Solution: numeric(x,0) -> DB_C_TYPE_INT
> > numeric(x,y) -> DB_C_TYPE_TYPE_DOUBLE
>
> Can you send a patch? In fact, I don't see any function in pg library
> which returns 'y'.
The patch doesn't exist, it was only idea. But the main question for me
is to support these data types.
These data cannot be stored as integer -- may be damaged ...
All ideas welcome.
Best regard,
Martin
--
Martin Landa <landa at gama.fsv.cvut.cz> * http://gama.fsv.cvut.cz/~landa *
CTU Prague, Faculty of Civil Engineering, Czech Republic
More information about the grass-dev
mailing list