[gdal-dev] Non-standard characters in GeoPackage table names

Jukka Rahkonen jukka.rahkonen at maanmittauslaitos.fi
Mon Aug 3 01:15:17 PDT 2015


Even Rouault <even.rouault <at> spatialys.com> writes:


> > Third and and perhaps best possibility might be to edit the "Annex A
> > Conformance / Abstract Test Suite (Normative)" part of the GeoPackage
> > standard to use quoted identifiers everywhere. Now the first test in the
> > test suite that fails with "test-table" seems to be already the third one:
> > 
> >  A.1.1.1.1.3 File Contents
> > Test Case ID: /base/core/container/data/file_contents
> > Test Purpose: Verify that the Geopackage only contains specified contents
> > Test Method:
> > 1) For each gpkg_* table_name
> > a) PRAGMA table_info(table_name)
> > ...
> > 
> > Should be written as PRAGMA table_info("table_name")...
> 
> In the above, table_name is intended to be a variable / symbolic name. If the 
> test was written  PRAGMA table_info("table_name"), it could potentially be 
> confused with the "table_name" identifier.
> I guess this is the reason for this test suite to be qualified as "Abstract", 
> because it only gives the intent of the test, but the actual test suite
has to 
> be implemented in a programming language.


Ok, I agree.  However, I would recommend for everybody who is making
GeoPackage software or running interoperability tests also to test if it is
possible to create and use tables which are named so that using quotes in
the SQL is necessary. I have a feeling that there is a high risk of
non-interoperability in here. At least I am lazy and I do not usually write
identifiers as quoted in my SQL queries. I would not be surprised if
programmers are lazy too and there can already exist GeoPackage programs
which do simply

SELECT attribute FROM table; instead of

SELECT "attribute" FROM "table"; 

even the latter syntax is necessary for example in case like

SELECT "attribute-with-dash" FROM "table-with-dash";

-Jukka Rahkonen-



More information about the gdal-dev mailing list