[postgis-tickets] r17063 - Get rid of use of oids in topology regress was taken out in PostgreSQL 12.
Regina Obe
lr at pcorp.us
Fri Nov 23 09:56:22 PST 2018
Author: robe
Date: 2018-11-23 09:56:22 -0800 (Fri, 23 Nov 2018)
New Revision: 17063
Modified:
branches/2.5/topology/test/hierarchy.sql
branches/2.5/topology/test/load_features.sql
branches/2.5/topology/test/more_features.sql
branches/2.5/topology/test/predicates.sql.in
branches/2.5/topology/test/regress/topojson.sql
Log:
Get rid of use of oids in topology regress was taken out in PostgreSQL 12.
Closes #4251 for PostGIS 2.5.2
Modified: branches/2.5/topology/test/hierarchy.sql
===================================================================
--- branches/2.5/topology/test/hierarchy.sql 2018-11-23 17:01:19 UTC (rev 17062)
+++ branches/2.5/topology/test/hierarchy.sql 2018-11-23 17:56:22 UTC (rev 17063)
@@ -7,8 +7,8 @@
--
CREATE TABLE features.big_parcels (
- feature_name varchar primary key
-) WITH OIDS;
+ feature_name varchar primary key, fid serial
+) ;
SELECT topology.AddTopoGeometryColumn('city_data', 'features',
'big_parcels', 'feature', 'POLYGON',
@@ -17,7 +17,7 @@
SELECT AddGeometryColumn('features','big_parcels','the_geom',-1,'MULTIPOLYGON',2);
-INSERT INTO features.big_parcels VALUES ('P1P2', -- Feature name
+INSERT INTO features.big_parcels(feature_name, feature) VALUES ('P1P2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -24,7 +24,7 @@
(SELECT layer_id FROM topology.layer WHERE table_name = 'big_parcels'),
'{{1,1},{2,1}}')); -- P1 and P2
-INSERT INTO features.big_parcels VALUES ('P3P4', -- Feature name
+INSERT INTO features.big_parcels(feature_name, feature) VALUES ('P3P4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -31,7 +31,7 @@
(SELECT layer_id FROM topology.layer WHERE table_name = 'big_parcels'),
'{{3,1},{4,1}}')); -- P3 and P4
-INSERT INTO features.big_parcels VALUES ('F3F6', -- Feature name
+INSERT INTO features.big_parcels(feature_name, feature) VALUES ('F3F6', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -46,8 +46,8 @@
--
CREATE TABLE features.big_streets (
- feature_name varchar primary key
-) WITH OIDS;
+ feature_name varchar primary key, fid serial
+) ;
SELECT topology.AddTopoGeometryColumn('city_data', 'features',
'big_streets', 'feature', 'LINE',
@@ -54,7 +54,7 @@
3 -- the city_streets layer id
);
-INSERT INTO features.big_streets VALUES ('R1R2', -- Feature name
+INSERT INTO features.big_streets(feature_name, feature)VALUES ('R1R2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (lineal)
@@ -64,7 +64,7 @@
WHERE feature_name in ('R1','R2')) -- R1 and R2
));
-INSERT INTO features.big_streets VALUES ('R4', -- Feature name
+INSERT INTO features.big_streets(feature_name, feature) VALUES ('R4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (lineal)
@@ -79,8 +79,8 @@
--
CREATE TABLE features.big_signs (
- feature_name varchar primary key
-) WITH OIDS;
+ feature_name varchar primary key, fid serial
+) ;
SELECT topology.AddTopoGeometryColumn('city_data', 'features',
'big_signs', 'feature', 'POINT',
@@ -87,9 +87,9 @@
2 -- the traffic_signs
);
-SELECT AddGeometryColumn('features','big_signs','the_geom',-1,'MULTIPOINT',2);
+SELECT AddGeometryColumn('features','big_signs','the_geom',0,'MULTIPOINT',2);
-INSERT INTO features.big_signs VALUES ('S1S2', -- Feature name
+INSERT INTO features.big_signs(feature_name, feature) VALUES ('S1S2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point/multipoint)
Modified: branches/2.5/topology/test/load_features.sql
===================================================================
--- branches/2.5/topology/test/load_features.sql 2018-11-23 17:01:19 UTC (rev 17062)
+++ branches/2.5/topology/test/load_features.sql 2018-11-23 17:56:22 UTC (rev 17063)
@@ -24,11 +24,11 @@
CREATE SCHEMA features;
CREATE TABLE features.land_parcels ( -- Land parcels (selected faces)
- feature_name VARCHAR PRIMARY KEY) with oids;
+ feature_name VARCHAR PRIMARY KEY, fid serial);
CREATE TABLE features.city_streets ( -- City streets (selected edges)
- feature_name VARCHAR PRIMARY KEY) with oids;
+ feature_name VARCHAR PRIMARY KEY, fid serial);
CREATE TABLE features.traffic_signs ( -- Traffic signs (selected nodes)
- feature_name VARCHAR PRIMARY KEY) with oids;
+ feature_name VARCHAR PRIMARY KEY, fid serial);
-- 4. Associate feature tables with the topology.
-- Add the three topology geometry layers to the CITY_DATA topology.
@@ -55,7 +55,7 @@
-- 6A. Load LAND_PARCELS table.
-- P1
-INSERT INTO features.land_parcels VALUES ('P1', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P1', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -64,7 +64,7 @@
);
-- P2
-INSERT INTO features.land_parcels VALUES ('P2', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -71,7 +71,7 @@
1, -- TG_LAYER_ID for this topology (from ALL_SDO_TOPO_METADATA)
'{{4,3},{7,3}}'));
-- P3
-INSERT INTO features.land_parcels VALUES ('P3', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P3', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -78,7 +78,7 @@
1, -- TG_LAYER_ID for this topology (from topology.layer)
'{{5,3},{8,3}}'));
-- P4
-INSERT INTO features.land_parcels VALUES ('P4', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -85,7 +85,7 @@
1, -- TG_LAYER_ID for this topology (from topology.layer)
'{{2,3}}'));
-- P5 (Includes F1, but not F9.)
-INSERT INTO features.land_parcels VALUES ('P5', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P5', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -94,7 +94,7 @@
-- 6B. Load TRAFFIC_SIGNS table.
-- S1
-INSERT INTO features.traffic_signs VALUES ('S1', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('S1', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -101,7 +101,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{14,1}}'));
-- S2
-INSERT INTO features.traffic_signs VALUES ('S2', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('S2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -108,7 +108,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{13,1}}'));
-- S3
-INSERT INTO features.traffic_signs VALUES ('S3', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('S3', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -115,7 +115,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{6,1}}'));
-- S4
-INSERT INTO features.traffic_signs VALUES ('S4', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('S4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -125,7 +125,7 @@
-- 6C. Load CITY_STREETS table.
-- (Note: "R" in feature names is for "Road", because "S" is used for signs.)
-- R1
-INSERT INTO features.city_streets VALUES ('R1', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('R1', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -132,7 +132,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{9,2},{-10,2}}')); -- E9, E10
-- R2
-INSERT INTO features.city_streets VALUES ('R2', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('R2', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -139,7 +139,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{4,2},{-5,2}}')); -- E4, E5
-- R3
-INSERT INTO features.city_streets VALUES ('R3', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('R3', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -146,7 +146,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{25,2}}'));
-- R4
-INSERT INTO features.city_streets VALUES ('R4', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('R4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
Modified: branches/2.5/topology/test/more_features.sql
===================================================================
--- branches/2.5/topology/test/more_features.sql 2018-11-23 17:01:19 UTC (rev 17062)
+++ branches/2.5/topology/test/more_features.sql 2018-11-23 17:56:22 UTC (rev 17063)
@@ -2,7 +2,7 @@
-- More parcels
-INSERT INTO features.land_parcels VALUES ('F3', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('F3', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -10,7 +10,7 @@
'{{3,3}}') -- face_id:3
);
-INSERT INTO features.land_parcels VALUES ('F6', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('F6', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -18,7 +18,7 @@
'{{6,3}}') -- face_id:3
);
-INSERT INTO features.land_parcels VALUES ('F3F4', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('F3F4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -26,7 +26,7 @@
'{{3,3},{4,3}}') -- face_id:3 face_id:4
);
-INSERT INTO features.land_parcels VALUES ('F1', -- Feature name
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('F1', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
@@ -36,7 +36,7 @@
-- More TRAFFIC_SIGNS
-INSERT INTO features.traffic_signs VALUES ('N1N2N3', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('N1N2N3', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -43,7 +43,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{1,1},{2,1},{3,1}}'));
-INSERT INTO features.traffic_signs VALUES ('N1N6N14', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('N1N6N14', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -50,7 +50,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{1,1},{6,1},{14,1}}'));
-INSERT INTO features.traffic_signs VALUES ('N3N4', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('N3N4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -57,7 +57,7 @@
2, -- TG_LAYER_ID for this topology (from topology.layer)
'{{3,1},{4,1}}'));
-INSERT INTO features.traffic_signs VALUES ('N4', -- Feature name
+INSERT INTO features.traffic_signs(feature_name, feature) VALUES ('N4', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
1, -- Topology geometry type (point)
@@ -66,7 +66,7 @@
-- More STREETS
-INSERT INTO features.city_streets VALUES ('E7E8', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('E7E8', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -73,7 +73,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{7,2},{8,2}}'));
-INSERT INTO features.city_streets VALUES ('E20E19', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('E20E19', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -80,7 +80,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{20,2},{19,2}}'));
-INSERT INTO features.city_streets VALUES ('E25', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('E25', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
@@ -87,7 +87,7 @@
3, -- TG_LAYER_ID for this topology (from topology.layer)
'{{-25,2}}'));
-INSERT INTO features.city_streets VALUES ('R1a', -- Feature name
+INSERT INTO features.city_streets(feature_name, feature) VALUES ('R1a', -- Feature name
topology.CreateTopoGeom(
'city_data', -- Topology name
2, -- Topology geometry type (line string)
Modified: branches/2.5/topology/test/predicates.sql.in
===================================================================
--- branches/2.5/topology/test/predicates.sql.in 2018-11-23 17:01:19 UTC (rev 17062)
+++ branches/2.5/topology/test/predicates.sql.in 2018-11-23 17:56:22 UTC (rev 17063)
@@ -22,7 +22,7 @@
SELECT a.feature_name, b.feature_name FROM
features.traffic_signs a, features.traffic_signs b
- WHERE a.oid < b.oid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
#endif
@@ -46,7 +46,7 @@
SELECT a.feature_name, b.feature_name FROM
features.city_streets a, features.city_streets b
- WHERE a.oid < b.oid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
#endif
#if DO_POINT_POLYGON_INTERSECTS
@@ -79,7 +79,7 @@
SELECT a.feature_name, b.feature_name FROM
features.land_parcels a, features.land_parcels b
- WHERE a.oid < b.oid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at intersects(a. at COLUMN@, b. at COLUMN@);
#endif
#if DO_POINT_POINT_EQUALS
@@ -88,7 +88,7 @@
SELECT a.feature_name, b.feature_name FROM
features.traffic_signs a, features.traffic_signs b
- WHERE a.oid < b.oid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
#endif
@@ -98,7 +98,7 @@
SELECT a.feature_name, b.feature_name FROM
features.city_streets a, features.city_streets b
- WHERE a.oid < b.oid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
#endif
@@ -108,7 +108,7 @@
SELECT a.feature_name, b.feature_name FROM
features.land_parcels a, features.land_parcels b
- WHERE a.oid < b.oid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
+ WHERE a.fid < b.fid AND @SCHEMA at equals(a. at COLUMN@, b. at COLUMN@);
#endif
@@ -116,15 +116,15 @@
SELECT a.feature_name, b.feature_name
FROM features.traffic_signs a, features.big_signs b
- WHERE a.oid < b.oid AND @SCHEMA at equals(a.feature, b.feature)
- ORDER BY a.oid;
+ WHERE a.fid < b.fid AND @SCHEMA at equals(a.feature, b.feature)
+ ORDER BY a.feature_name;
SELECT 'POLYGON/POLYGON EQUALS (simple/hierarchical)' as operation;
SELECT a.feature_name, b.feature_name
FROM features.land_parcels a, features.big_parcels b
- WHERE a.oid < b.oid AND @SCHEMA at equals(a.feature, b.feature)
- ORDER BY a.oid;
+ WHERE a.fid < b.fid AND @SCHEMA at equals(a.feature, b.feature)
+ ORDER BY a.feature_name;
END;
Modified: branches/2.5/topology/test/regress/topojson.sql
===================================================================
--- branches/2.5/topology/test/regress/topojson.sql 2018-11-23 17:01:19 UTC (rev 17062)
+++ branches/2.5/topology/test/regress/topojson.sql 2018-11-23 17:56:22 UTC (rev 17063)
@@ -80,7 +80,7 @@
-- And this defines a new feature including both face 1and the new
-- wrapping face 11 plus the new (holed) face 12
-INSERT INTO features.land_parcels VALUES ('P6',
+INSERT INTO features.land_parcels(feature_name, feature) VALUES ('P6',
topology.CreateTopoGeom(
'city_data', -- Topology name
3, -- Topology geometry type (polygon/multipolygon)
More information about the postgis-tickets
mailing list