[GRASS-dev] Misleading help of v.db.add*
Moritz Lennert
mlennert at club.worldonline.be
Thu May 29 17:11:10 EDT 2008
On 29/05/08 09:25, Huidae Cho wrote:
> Hi,
>
> I just tried to add a column to an existing attribute table in
> PostgreSQL and found a misleading help message. The help message of
> v.db.addcol/v.db.addtable says "types depend on database backend, but
> all support VARCHAR(), INT, DOUBLE and DATE". I'm not so sure if the
> postgres driver in GRASS supports the DOUBLE type internally. However,
> since v.db.add* scripts directly run db.execute which calls
> db_driver_execute_immediate(), and PostgreSQL only supports DOUBLE
> PRECISION and REAL for floating-point numbers, the help message is not
> valid at least for PostgreSQL.
>
> If those three data types are supposed to be common data types for all
> database backends, v.db.add* scripts need to convert DOUBLE to a
> corresponding valid data type based on the database backend. Otherwise,
> IMO, the help message needs to be revised to avoid confusion.
I am the culprit of this formulation. I agree that it should be adapted,
but someone would have to check which common types are available across
all backends...
Moritz
More information about the grass-dev
mailing list