|
| 1 | + |
| 2 | +/*PGR-GNU***************************************************************** |
| 3 | + |
| 4 | +Copyright (c) 2018 pgRouting developers |
| 5 | + |
| 6 | + |
| 7 | +------ |
| 8 | +This program is free software; you can redistribute it and/or modify |
| 9 | +it under the terms of the GNU General Public License as published by |
| 10 | +the Free Software Foundation; either version 2 of the License, or |
| 11 | +(at your option) any later version. |
| 12 | +This program is distributed in the hope that it will be useful, |
| 13 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | +GNU General Public License for more details. |
| 16 | +You should have received a copy of the GNU General Public License |
| 17 | +along with this program; if not, write to the Free Software |
| 18 | +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | + ********************************************************************PGR-GNU*/ |
| 20 | +BEGIN; |
| 21 | + |
| 22 | +SELECT CASE WHEN min_version('4.0.0') THEN plan(5) ELSE plan(1) END; |
| 23 | + |
| 24 | +CREATE OR REPLACE FUNCTION types_check() |
| 25 | +RETURNS SETOF TEXT AS |
| 26 | +$BODY$ |
| 27 | +BEGIN |
| 28 | + |
| 29 | + IF NOT min_version('4.0.0') THEN |
| 30 | + RETURN QUERY |
| 31 | + SELECT skip(1, 'pgr_minDegreeOrdering: Function is new on 4.0.0'); |
| 32 | + RETURN; |
| 33 | + END IF; |
| 34 | + |
| 35 | + RETURN QUERY SELECT has_function('pgr_mindegreeordering'); |
| 36 | + RETURN QUERY SELECT has_function('pgr_mindegreeordering', ARRAY['text']); |
| 37 | + RETURN QUERY SELECT function_returns('pgr_mindegreeordering', ARRAY['text'], 'setof record'); |
| 38 | + |
| 39 | + RETURN QUERY |
| 40 | + SELECT function_args_eq('pgr_mindegreeordering', |
| 41 | + $$SELECT '{"","seq","node"}'::TEXT[] $$ |
| 42 | + ); |
| 43 | + |
| 44 | + RETURN QUERY |
| 45 | + SELECT function_types_eq('pgr_mindegreeordering', |
| 46 | + $$VALUES |
| 47 | + ('{text,int8,int8}'::TEXT[]) |
| 48 | + $$ |
| 49 | + ); |
| 50 | +END; |
| 51 | +$BODY$ |
| 52 | +LANGUAGE plpgsql; |
| 53 | + |
| 54 | +SELECT types_check(); |
| 55 | + |
| 56 | +SELECT * FROM finish(); |
| 57 | +ROLLBACK; |
0 commit comments