JDBCDataStore should not dictate new column lengths
---------------------------------------------------
Key: GEOT-3254
URL: http://jira.codehaus.org/browse/GEOT-3254
Project: GeoTools
Issue Type: Bug
Components: data jdbc-ng
Affects Versions: 2.6.5
Reporter: Miles Jordan
Attachments: JDBCDataStore.java.diff
The CreateTableSQL function in JDBCDataStore currently creates varchar columns
with a length of 255 if a length cannot be determined. Justin comments within
the code that this is done because some dialects require varchars to have an
associated size with them when the column is created.
Dialects should be able to behave differently, so if there are some dialects
that require it and some that don't, then the ones that do should override the
encodeColumnType function and add in a default length there.
I am copying entire tables from Oracle into Postgis and 255 is being set as the
max length for all my PostGIS varchars, where a lot of the data that has to fit
inside is much larger than that, and Postgres does not have a requirement for a
maximum length of a varchar column to be set.
By removing the length (as in the patch) it works, however the dialects that do
require a length to be set will break unless they specify a default length
themselves where required.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel