@@ -18,21 +18,56 @@ along with this program; if not, write to the Free Software
1818Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1919 ********************************************************************PGR-GNU*/
2020BEGIN;
21- SELECT plan(5 );
21+ SELECT plan(15 );
2222
2323SELECT has_function('pgr_withpointsksp');
24- SELECT has_function('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','boolean','boolean','character','boolean']);
25- SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','boolean','boolean','character','boolean'],'setof record');
24+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','character','boolean','boolean','boolean']);
25+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','bigint','anyarray','integer','character','boolean','boolean','boolean']);
26+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','anyarray','bigint','integer','character','boolean','boolean','boolean']);
27+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','anyarray','anyarray','integer','character','boolean','boolean','boolean']);
28+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','text','integer','character','boolean','boolean','boolean']);
29+
30+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','character','boolean','boolean','boolean'],'setof record');
31+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','bigint','anyarray','integer','character','boolean','boolean','boolean'],'setof record');
32+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','anyarray','bigint','integer','character','boolean','boolean','boolean'],'setof record');
33+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','anyarray','anyarray','integer','character','boolean','boolean','boolean'],'setof record');
34+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','text','integer','character','boolean','boolean','boolean'],'setof record');
2635
27- SELECT set_eq(
28- $$SELECT proargnames from pg_proc WHERE proname = 'pgr_withpointsksp'$$,
29- $$SELECT '{"","","","","","directed","heap_paths","driving_side","details","seq","path_id","path_seq","node","edge","cost","agg_cost"}'::TEXT[] $$
30- );
36+ /*Remove last 1 row on v4*/
37+ SELECT CASE WHEN min_version('3.6.0')
38+ THEN collect_tap(
39+ set_eq(
40+ $$SELECT proargnames from pg_proc WHERE proname = 'pgr_withpointsksp'$$,
41+ $$VALUES
42+ ('{"","","","","","","directed","heap_paths","details","seq","path_id","path_seq","start_vid","end_vid","node","edge","cost","agg_cost"}'::TEXT[]),
43+ ('{"","","","","","directed","heap_paths","details","seq","path_id","path_seq","start_vid","end_vid","node","edge","cost","agg_cost"}'::TEXT[]),
44+ ('{"","","","","","directed","heap_paths","driving_side","details","seq","path_id","path_seq","node","edge","cost","agg_cost"}'::TEXT[])
45+ $$),
46+ set_eq(
47+ $$SELECT proallargtypes FROM pg_proc WHERE proname = 'pgr_withpointsksp'$$,
48+ $$VALUES
49+ ('{25,25,20,20,23,1042,16,16,16,23,23,23,20,20,20,20,701,701}'::OID[]),
50+ ('{25,25,20,2277,23,1042,16,16,16,23,23,23,20,20,20,20,701,701}'::OID[]),
51+ ('{25,25,2277,20,23,1042,16,16,16,23,23,23,20,20,20,20,701,701}'::OID[]),
52+ ('{25,25,2277,2277,23,1042,16,16,16,23,23,23,20,20,20,20,701,701}'::OID[]),
53+ ('{25,25,25,23,1042,16,16,16,23,23,23,20,20,20,20,701,701}'::OID[]),
54+ ('{25,25,20,20,23,16,16,1042,16,23,23,23,20,20,701,701}'::OID[])
55+ $$)
56+ )
57+ ELSE collect_tap(
58+ set_eq(
59+ $$SELECT proargnames from pg_proc WHERE proname = 'pgr_withpointsksp'$$,
60+ $$SELECT '{"","","","","","directed","heap_paths","driving_side","details","seq","path_id","path_seq","node","edge","cost","agg_cost"}'::TEXT[] $$
61+ ),
62+ set_eq(
63+ $$SELECT proallargtypes FROM pg_proc WHERE proname = 'pgr_withpointsksp'$$,
64+ $$SELECT '{25,25,20,20,23,16,16,1042,16,23,23,23,20,20,701,701}'::OID[] $$
65+ )
66+ )END;
3167
32- SELECT set_eq(
33- $$SELECT proallargtypes FROM pg_proc WHERE proname = 'pgr_withpointsksp'$$,
34- $$SELECT '{25,25,20,20,23,16,16,1042,16,23,23,23,20,20,701,701}'::OID[] $$
35- );
68+ /* TODO remove on v4*/
69+ SELECT has_function('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','boolean','boolean','character','boolean']);
70+ SELECT function_returns('pgr_withpointsksp',ARRAY['text','text','bigint','bigint','integer','boolean','boolean','character','boolean'],'setof record');
3671
3772SELECT finish();
3873ROLLBACK;
0 commit comments