icu: switch postcodes to using the pre-formatted one

This commit is contained in:
Sarah Hoffmann
2022-06-03 17:12:01 +02:00
parent ca7b46511d
commit b7704833e4
4 changed files with 21 additions and 13 deletions

View File

@@ -104,6 +104,13 @@ AS $$
$$ LANGUAGE SQL IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION token_get_postcode(info JSONB)
RETURNS TEXT
AS $$
SELECT info->>'postcode';
$$ LANGUAGE SQL IMMUTABLE STRICT;
-- Return token info that should be saved permanently in the database.
CREATE OR REPLACE FUNCTION token_strip_info(info JSONB)
RETURNS JSONB