[GRASS-dev] new v.in.geonames: problems with UTF-8 Unicode text
Markus Neteler
neteler at osgeo.org
Tue Jul 1 18:10:00 EDT 2008
On Tue, Jul 1, 2008 at 6:55 PM, Glynn Clements <glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>> when using the SQLite driver, it cuts the "alternatename" field at
>> 256 chars due to a hardcoded limitation in describe.c. I don't
>> remember why not varchar() length is used there.
>
> SQLite doesn't have VARCHAR. If you create a VARCHAR column, the
> driver translates it to TEXT. The size you specify when the table is
> created isn't stored anywhere.
This is not clear to me:
- I run v.in.ascii and define that I want varchar(4000).
- this is sent to DBMI which calls the SQLite driver
- in the SQLite driver 255 is hardcoded for TEXT and the
"alternatename" field is cut
- hardcoding something much longer isn't convenient due to
troubles when moving table to other DBMS
so far understood.
-> question: any chance to remove the hardcoded 255 limit
and use instead the length I defined in the v.in.ascii call?
Or is that size information eliminated in the communication
between v.in.ascii and SQLite driver?
> [BTW, it appears that the PostgreSQL driver has a bug regarding TEXT
> columns. get_column_info() (db/drivers/postgres/describe.c) doesn't
> fill in the size field for TEXT columns, but describe_table() assumes
> that it will always be filled in.]
(not sure how to fix that)
Markus
More information about the grass-dev
mailing list