
	SELECT 'Other ST_FlipCoordinates PointSet: Start Testing POINT';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 15) j
			ORDER BY i,j
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PointSet: End Testing POINT';
		

		
	SELECT 'Other ST_FlipCoordinates LineSet: Start Testing LINESTRING';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 15) As j
			WHERE NOT(i = j)
			ORDER BY i, i*j)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates LineSet: End Testing LINESTRING';
		

		
	SELECT 'Other ST_FlipCoordinates PolySet: Start Testing POLYGON';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05)  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 20) As j
			ORDER BY i, i*j, j)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PolySet: End Testing POLYGON';
		

		
	SELECT 'Other ST_FlipCoordinates PointMSet: Start Testing POINTM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 20) AS j
			CROSS JOIN generate_series(1,2) As m
			ORDER BY i, j, i*j*m)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PointMSet: End Testing POINTM';
		

		
	SELECT 'Other ST_FlipCoordinates LineMSet: Start Testing LINESTRINGM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 20) As j
			CROSS JOIN generate_series(1,2) As m
			WHERE NOT(i = j)
			ORDER BY i, j, m, i*j*m)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates LineMSet: End Testing LINESTRINGM';
		

		
	SELECT 'Other ST_FlipCoordinates PolygonMSet: Start Testing POLYGONM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePointM(i+m,j,m),4326),ST_SetSRID(ST_MakePointM(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePointM(i,j,m),4326)),ST_SetSRID(ST_MakePointM(i+m,j,m),4326)))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 20) As j
			CROSS JOIN generate_series(1,2) As m
			ORDER BY i, j, m, i*j*m
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PolygonMSet: End Testing POLYGONM';
		

		
	SELECT 'Other ST_FlipCoordinates PointSet3D: Start Testing POINTZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 20) j
			CROSS JOIN generate_series(1,2) k
			ORDER BY i,i*j, j*k, i + j + k)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PointSet3D: End Testing POINTZ';
		

		
	SELECT 'Other ST_FlipCoordinates LineSet3D: Start Testing LINESTRINGZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 20) j
			CROSS JOIN generate_series(1,2) k
			ORDER BY i, j, i+j+k, k, i*j*k)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates LineSet3D: End Testing LINESTRINGZ';
		

		
	SELECT 'Other ST_FlipCoordinates PolygonSet3D: Start Testing POLYGONZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326)  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 20) As j
			CROSS JOIN generate_series(1,2) As m
			ORDER BY i, j, i+j+m, m, i*j*m)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates PolygonSet3D: End Testing POLYGONZ';
		

		
	SELECT 'Other ST_FlipCoordinates GCSet3D: Start Testing GEOMETRYCOLLECTIONZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(ST_Collect(ST_SetSRID(ST_MakePoint(i,j,m),4326),ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326)))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 20) As j
			CROSS JOIN generate_series(1,2) As m
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates GCSet3D: End Testing GEOMETRYCOLLECTIONZ';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPointSet: Start Testing MULTIPOINT';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(s.the_geom) As the_geom
		FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 15) j
			) As s)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPointSet: End Testing MULTIPOINT';
		

		
	SELECT 'Other ST_FlipCoordinates MultiLineSet: Start Testing MULTILINESTRING';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(s.the_geom) As the_geom
		FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 15) As j
			WHERE NOT(i = j)) As s)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiLineSet: End Testing MULTILINESTRING';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPolySet: Start Testing MULTIPOLYGON';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05)))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 25) As j)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPolySet: End Testing MULTIPOLYGON';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPointSet3D: Start Testing MULTIPOINTZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 25) j
			CROSS JOIN generate_series(1,3) k
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPointSet3D: End Testing MULTIPOINTZ';
		

		
	SELECT 'Other ST_FlipCoordinates MultiLineSet3D: Start Testing MULTILINESTRINGZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 25) j
			CROSS JOIN generate_series(1,2) k
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiLineSet3D: End Testing MULTILINESTRINGZ';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPolySet3D: Start Testing MULTIPOLYGONZ';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Multi(ST_Union(s.the_geom)) As the_geom
		FROM (SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePoint(i+m,j,m),4326),ST_SetSRID(ST_MakePoint(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePoint(i,j,m),4326)),ST_SetSRID(ST_MakePoint(i+m,j,m),4326)))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 25) As j
			CROSS JOIN generate_series(1,2) As m
			) As s)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPolySet3D: End Testing MULTIPOLYGONZ';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPointMSet: Start Testing MULTIPOINTM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(s.the_geom) As the_geom
		FROM (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 25) AS j
			CROSS JOIN generate_series(1,2) As m
			) As s)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPointMSet: End Testing MULTIPOINTM';
		

		
	SELECT 'Other ST_FlipCoordinates MultiLineMSet: Start Testing MULTILINESTRINGM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_Collect(s.the_geom) As the_geom
		FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326))  As the_geom
		FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(50,70, 25) As j
			CROSS JOIN generate_series(1,2) As m
			WHERE NOT(i = j)) As s)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiLineMSet: End Testing MULTILINESTRINGM';
		

		
	SELECT 'Other ST_FlipCoordinates MultiPolygonMSet: Start Testing MULTIPOLYGONM';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((
			SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))')  As the_geom
			)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultiPolygonMSet: End Testing MULTIPOLYGONM';
		

		
	SELECT 'Other ST_FlipCoordinates Empty: Start Testing GEOMETRY';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('POLYGON EMPTY',4326) As the_geom
		)
		) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates Empty: End Testing GEOMETRY';
		

		
	SELECT 'Other ST_FlipCoordinates SingleNULL: Start Testing GEOMETRY';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT CAST(Null As geometry) As the_geom)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates SingleNULL: End Testing GEOMETRY';
		

		
	SELECT 'Other ST_FlipCoordinates MultipleNULLs: Start Testing GEOMETRY';
	BEGIN; 
	SELECT ST_FlipCoordinates(foo1.the_geom)
			  
			FROM ((SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo)) As foo1
			LIMIT 3;
	COMMIT;
	SELECT 'ST_FlipCoordinates MultipleNULLs: End Testing GEOMETRY';
		

		