[SCM] PostGIS branch master updated. 3.4.0rc1-1036-g990c57c89

git at osgeo.org git at osgeo.org
Fri Mar 15 16:42:53 PDT 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  990c57c89492e5a3b46e58fed9a7ac6450be4bde (commit)
      from  ddae34d6a894b08cd2d524356ed9444eb7447f4b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 990c57c89492e5a3b46e58fed9a7ac6450be4bde
Author: Regina Obe <lr at pcorp.us>
Date:   Fri Mar 15 19:42:03 2024 -0400

    Guarantee order of us_lex items
    References #5695 for PostGIS 3.5.0

diff --git a/extensions/address_standardizer/expected/test-debug_standardize_address.out b/extensions/address_standardizer/expected/test-debug_standardize_address.out
index 70b2dfb40..3c3f004bb 100644
--- a/extensions/address_standardizer/expected/test-debug_standardize_address.out
+++ b/extensions/address_standardizer/expected/test-debug_standardize_address.out
@@ -31,7 +31,8 @@ SELECT '#5299b' AS ticket, jsonb_array_length(d->'rules') AS num_rules, jsonb_ar
 (1 row)
 
 SELECT '#5299bt' AS ticket, it->>'pos' AS pos, it->>'word' AS word,  it->>'token' AS token, it->>'stdword' AS stdword FROM jsonb(debug_standardize_address('us_lex',  'us_gaz', 'us_rules','50 Gold Piece Drive, Boston, MA, 02020')) AS d, jsonb_array_elements(d->'input_tokens') AS it
-WHERE it @> '{"pos": 2}'::jsonb;
+WHERE it @> '{"pos": 2}'::jsonb
+ORDER BY pos, stdword, word, token;
  ticket  | pos | word  | token | stdword 
 ---------+-----+-------+-------+---------
  #5299bt | 2   | PIECE | UNITH | PIECE
diff --git a/extensions/address_standardizer/expected/test-standardize_address_1.out b/extensions/address_standardizer/expected/test-standardize_address_1.out
index 5a12a1dcb..98fcb099b 100644
--- a/extensions/address_standardizer/expected/test-standardize_address_1.out
+++ b/extensions/address_standardizer/expected/test-standardize_address_1.out
@@ -46,3 +46,9 @@ SELECT '#5299b' AS ticket, * FROM standardize_address('us_lex',  'us_gaz', 'us_r
  #5299b |          | 50        |        |      |         | GOLD PIECE | DRIVE   |        |            |       | BOSTON | MASSACHUSETTS |         | 02020    |     | 
 (1 row)
 
+SELECT '#5695a' AS ticket, * FROM standardize_address('us_lex', 'us_gaz', 'us_rules', 'ONE E PIMA ST STE 999, TUCSON, AZ');
+ ticket | building | house_num | predir | qual | pretype | name | suftype | sufdir | ruralroute | extra |  city  |  state  | country | postcode | box |   unit    
+--------+----------+-----------+--------+------+---------+------+---------+--------+------------+-------+--------+---------+---------+----------+-----+-----------
+ #5695a |          | 1         | EAST   |      |         | PIMA | STREET  |        |            |       | TUCSON | ARIZONA | USA     |          |     | SUITE 999
+(1 row)
+
diff --git a/extensions/address_standardizer/test-debug_standardize_address.sql.in b/extensions/address_standardizer/test-debug_standardize_address.sql.in
index 8d3e77b5e..9840f2808 100644
--- a/extensions/address_standardizer/test-debug_standardize_address.sql.in
+++ b/extensions/address_standardizer/test-debug_standardize_address.sql.in
@@ -8,6 +8,7 @@ SELECT '#2978c' As ticket, jsonb_array_length(d->'rules') AS num_rules, jsonb_ar
 SELECT '#5299b' AS ticket, jsonb_array_length(d->'rules') AS num_rules, jsonb_array_length(d->'input_tokens') AS num_input_tokens, d->'rules'->0->'score' AS best_score FROM jsonb(debug_standardize_address('us_lex',  'us_gaz', 'us_rules','50 Gold Piece Drive, Boston, MA, 02020')) AS d;
 
 SELECT '#5299bt' AS ticket, it->>'pos' AS pos, it->>'word' AS word,  it->>'token' AS token, it->>'stdword' AS stdword FROM jsonb(debug_standardize_address('us_lex',  'us_gaz', 'us_rules','50 Gold Piece Drive, Boston, MA, 02020')) AS d, jsonb_array_elements(d->'input_tokens') AS it
-WHERE it @> '{"pos": 2}'::jsonb;
+WHERE it @> '{"pos": 2}'::jsonb
+ORDER BY pos, stdword, word, token;
 
 SELECT r->>'score' AS score,r->>'rule_string' AS rule, r->>'rule_stub_string' AS rule_stub  FROM jsonb(debug_standardize_address('us_lex','us_gaz','us_rules', '25 Prince Street, NC 09985')) AS d, jsonb_array_elements(d->'rules') AS r;
diff --git a/extensions/address_standardizer/test-standardize_address_1.sql.in b/extensions/address_standardizer/test-standardize_address_1.sql.in
index 9255d7356..f49694421 100644
--- a/extensions/address_standardizer/test-standardize_address_1.sql.in
+++ b/extensions/address_standardizer/test-standardize_address_1.sql.in
@@ -6,3 +6,4 @@ SELECT '#2978b' As ticket, * FROM standardize_address('us_lex','us_gaz','us_rule
 SELECT '#2978c' As ticket, * FROM standardize_address('us_lex','us_gaz','us_rules', '10-20 DORRANCE ST, PROVIDENCE, RI');
 SELECT '#5299a' AS ticket, * FROM standardize_address('us_lex',  'us_gaz', 'us_rules','1 Timepiece Point','Boston, MA, 02220');
 SELECT '#5299b' AS ticket, * FROM standardize_address('us_lex',  'us_gaz', 'us_rules','50 Gold Piece Drive','Boston, MA, 02020');
+SELECT '#5695a' AS ticket, * FROM standardize_address('us_lex', 'us_gaz', 'us_rules', 'ONE E PIMA ST STE 999, TUCSON, AZ');
\ No newline at end of file
diff --git a/extensions/address_standardizer/us_lex.sql b/extensions/address_standardizer/us_lex.sql
index 362ec58de..569efa3a9 100644
--- a/extensions/address_standardizer/us_lex.sql
+++ b/extensions/address_standardizer/us_lex.sql
@@ -2955,7 +2955,8 @@ WITH t(seq,word,stdword,token) AS ( VALUES (1, '#', '#', 16),
 (1, 'ZNJA', 'ZANJA', 1) )
 SELECT seq, word, stdword, token
 FROM t
-WHERE NOT EXISTS(SELECT 1 FROM us_lex AS t2 WHERE t2.seq = t.seq AND t2.word = t.word AND t2.stdword = t.stdword AND t2.token = t.token );
+WHERE NOT EXISTS(SELECT 1 FROM us_lex AS t2 WHERE t2.seq = t.seq AND t2.word = t.word AND t2.stdword = t.stdword AND t2.token = t.token )
+ORDER BY word, seq, token, stdword;
 
 -- needed set default back to original
 ALTER TABLE us_lex ALTER COLUMN is_custom SET DEFAULT true;

-----------------------------------------------------------------------

Summary of changes:
 .../expected/test-debug_standardize_address.out                     | 3 ++-
 .../address_standardizer/expected/test-standardize_address_1.out    | 6 ++++++
 .../address_standardizer/test-debug_standardize_address.sql.in      | 3 ++-
 extensions/address_standardizer/test-standardize_address_1.sql.in   | 1 +
 extensions/address_standardizer/us_lex.sql                          | 3 ++-
 5 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list