You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/bdd/flex/lua-index-definitions.feature
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -476,3 +476,64 @@ Feature: Index definitions in Lua file
476
476
Then SELECT schemaname, tablename FROM pg_catalog.pg_indexes WHERE tablename = 'mytable' AND indexdef LIKE '%USING btree (name)%' AND indexdef LIKE '%WHERE (name = lower(name))%'
477
477
| schemaname | tablename |
478
478
| public | mytable |
479
+
480
+
Scenario: Don't create id index if the configuration doesn't mention it
481
+
Given the input file 'liechtenstein-2013-08-03.osm.pbf'
482
+
And the lua style
483
+
"""
484
+
local t = osm2pgsql.define_table({
485
+
name = 'mytable',
486
+
ids = { type = 'node', id_column = 'node_id' },
487
+
columns = {
488
+
{ column = 'name', type = 'text' },
489
+
{ column = 'tags', type = 'jsonb' },
490
+
{ column = 'geom', type = 'geometry' },
491
+
}
492
+
})
493
+
"""
494
+
When running osm2pgsql flex
495
+
Then table pg_catalog.pg_indexes has 0 rows with condition
496
+
"""
497
+
schemaname = 'public' AND tablename = 'mytable' AND indexname LIKE '%node_id%'
498
+
"""
499
+
500
+
Scenario: Don't create id index if the configuration doesn't says so
501
+
Given the input file 'liechtenstein-2013-08-03.osm.pbf'
0 commit comments