-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm having trouble referencing camel cased db columns? #389
Comments
I tried to follow this example from the docs...
but if I use curl localhost:3000/public.points.somCamelCasedColumn/0/0/0.pbf I will get the err. |
there must be a bug in matching config to what was auto-discovered. Should be an easy bug to fix (i haven't yet confirmed this is a real bug) |
Pg is case sensitive. See doc 4.1.1 |
I think this is a bigger issue than I first thought, and we may need to figure out the "proper" (least surprising) way to handle it. Here's an example of a table that breaks every possible "good design principle" rules. The schema, table, index, and fields all use mixed cases or keywords. On top of it, it also creates two tables that only differ in table name case, and multiple identical field names. I think the best matching algorithm would be this:
DROP SCHEMA IF EXISTS "MixedCase" CASCADE;
CREATE SCHEMA "MixedCase";
CREATE TABLE "MixedCase"."PoiNTs3"("Gid" SERIAL PRIMARY KEY, "TABLE" TEXT, "table" INT, "Geom" GEOMETRY(POINT, 4326));
CREATE TABLE "MixedCase"."Points3"("Gid" SERIAL PRIMARY KEY, "TABLE" TEXT, "Geom" GEOMETRY(POINT, 4326));
INSERT INTO "MixedCase"."Points3"
SELECT
generate_series(1, 10000) as id,
md5(random()::text) as "TABLE",
(
ST_DUMP(ST_GENERATEPOINTS(ST_GEOMFROMTEXT('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326), 10000))
).Geom;
CREATE INDEX ON "MixedCase"."Points3" USING GIST("Geom");
CLUSTER "MixedCase"."Points3" USING "Points3_Geom_idx"; |
I need help or an example on how to configure the settings for camelCased geometry columns. If I use a camel-column, I get the following error.
ERROR martin::server] Can't get composite source tile: db error: ERROR: column "someCamelCasedColumn" does not exist
The column does exist and I have verified that other tile server programs and database visualizers are able to display the associated polygons. Furthermore, the column is detected when martin scans the database.
The text was updated successfully, but these errors were encountered: