diff schema/isrs_tests.sql @ 2081:40711ca3aa19

Add function to get text representation of location code The text representation is appropriate for user visible output as well as for use in SQL expressions where the composite type is not supported.
author Tom Gottfried <tom@intevation.de>
date Thu, 31 Jan 2019 12:36:54 +0100
parents f9f1babe52ae
children 7936b46a88d4
line wrap: on
line diff
--- a/schema/isrs_tests.sql	Thu Jan 31 11:29:43 2019 +0100
+++ b/schema/isrs_tests.sql	Thu Jan 31 12:36:54 2019 +0100
@@ -30,6 +30,11 @@
     'ISRS text input needs to have correct length');
 
 SELECT ok(
+    'DEBON03901G007906548' = isrs_asText(isrs_fromText('DEBON03901G007906548'))
+    ,
+    'isrs_asText() is the inverse of isrs_fromText()');
+
+SELECT ok(
     ISRSrange_area(isrsrange(
             ('AT', 'XXX', '00001', '00000', 0)::isrs,
             ('AT', 'XXX', '00001', '00000', 1)::isrs),