Mercurial > gemma
changeset 578:61af85a432bf
Fix extraction of object reference code
Use something more distinguishing in test to make it more likely
to catch similar errors.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 06 Sep 2018 13:19:51 +0200 |
parents | e6c9d2da2e20 |
children | 642df1164aca |
files | schema/isrs.sql schema/isrs_tests.sql |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/isrs.sql Wed Sep 05 19:13:37 2018 +0200 +++ b/schema/isrs.sql Thu Sep 06 13:19:51 2018 +0200 @@ -45,7 +45,7 @@ substring(isrs_text from 1 for 2), substring(isrs_text from 3 for 3), substring(isrs_text from 6 for 5), - substring(isrs_text from 10 for 5), + substring(isrs_text from 11 for 5), CAST(substring(isrs_text from 16 for 5) AS int)) AS isrs); END IF;
--- a/schema/isrs_tests.sql Wed Sep 05 19:13:37 2018 +0200 +++ b/schema/isrs_tests.sql Thu Sep 06 13:19:51 2018 +0200 @@ -3,10 +3,10 @@ -- SELECT results_eq($$ - SELECT isrs_fromText('DEXXX039000000005023') + SELECT isrs_fromText('DEBON03901G007906548') $$, $$ - SELECT CAST(('DE', 'XXX', '03900', '00000', 5023) AS isrs) + SELECT CAST(('DE', 'BON', '03901', 'G0079', 6548) AS isrs) $$, 'Correct ISRS text input gives respective ISRS location code');