aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-04 21:45:46 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-04-04 21:51:10 +0200
commitf85b0723136eed9891569b988607f07ef185d504 (patch)
tree9b219b3feadbbeb99322924e50a8761db09c67de /src
parent5c9e2e9d4322271930385fe76195ef4d16cf5a40 (diff)
downloadPROJ-f85b0723136eed9891569b988607f07ef185d504.tar.gz
PROJ-f85b0723136eed9891569b988607f07ef185d504.zip
Database: decrease db size by using a INTEGER_OR_TEXT data type on codes
Most codes (especially *all* in EPSG) are integers. As integers are stored as variable-length in the db, it is preferable to store them as such when possible. So use a special INTEGER_OR_TEXT data type. This is a "non-standard" type declaration, but this is perfectly legal as SQLite is loosely typed. As this declaration contains the string INT, it is assigned INTEGER affinity. Which means that values provided either as text (that contains integer value) or integer will be stored as integers, whereas text values will be stored as text. See paragraph 3 and 3.1 of https://www.sqlite.org/datatype3.html. The "INTEGER_OR_TEXT" name is a hint for the user, and software like GDAL (>= 3.3) to expose the column as string... The effect of using this rather than TEXT is making the DB size go from 9 MB to 8.4. There is no need to change the DATABASE.LAYOUT version numbering as this is completely forward and backward compatible.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions