From git at osgeo.org Mon Feb 2 07:34:31 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 2 Feb 2026 07:34:31 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-325-g7c7ab9cd5 Message-ID: <20260202153431.793691A1FD8@trac.osgeo.org> 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 7c7ab9cd551a8edd438ce63b21dffd48351e4c02 (commit) via 687f2c1b08e4e045e5991373270baf439cc90886 (commit) from 94ef97c1abee29b69e83e81eb535e67ffd2a4c2c (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 7c7ab9cd551a8edd438ce63b21dffd48351e4c02 Merge: 94ef97c1a 687f2c1b0 Author: Paul Ramsey Date: Mon Feb 2 07:34:23 2026 -0800 Merge branch 'ProjectMutilation-flatgeof-fix-typo' commit 687f2c1b08e4e045e5991373270baf439cc90886 Author: Maksim Korotkov Date: Mon Feb 2 16:08:43 2026 +0300 Fix memory allocation size for arrays in flatgeobuf_decode_row The original code incorrectly allocated memory for pointers instead of the actual types, potentially causing buffer overflows or memory corruption since it was allocating insufficient memory (size of pointer instead of size of Datum/bool). Found by PostgesPro. Fixes: 3ae2c5844 ("FlatGeobuf format input/output") Signed-off-by: Maksim Korotkov diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c index e6c5f5c87..eb29f8920 100644 --- a/postgis/flatgeobuf.c +++ b/postgis/flatgeobuf.c @@ -466,8 +466,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx) HeapTuple heapTuple; uint32_t natts = ctx->tupdesc->natts; - Datum *values = palloc0(natts * sizeof(Datum *)); - bool *isnull = palloc0(natts * sizeof(bool *)); + Datum *values = palloc0(natts * sizeof(Datum)); + bool *isnull = palloc0(natts * sizeof(bool)); values[0] = Int32GetDatum(ctx->fid); ----------------------------------------------------------------------- Summary of changes: postgis/flatgeobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 2 07:35:56 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 2 Feb 2026 07:35:56 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.6 updated. 3.6.1-20-g3d64dfde0 Message-ID: <20260202153556.4DE0B1A2E55@trac.osgeo.org> 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, stable-3.6 has been updated via 3d64dfde01432a157f37ce3694c22d24f4d65776 (commit) from 54b890ef9226adf295850600b85984a933676fb9 (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 3d64dfde01432a157f37ce3694c22d24f4d65776 Author: Maksim Korotkov Date: Mon Feb 2 16:08:43 2026 +0300 Fix memory allocation size for arrays in flatgeobuf_decode_row The original code incorrectly allocated memory for pointers instead of the actual types, potentially causing buffer overflows or memory corruption since it was allocating insufficient memory (size of pointer instead of size of Datum/bool). Found by PostgesPro. Fixes: 3ae2c5844 ("FlatGeobuf format input/output") Signed-off-by: Maksim Korotkov diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c index e6c5f5c87..eb29f8920 100644 --- a/postgis/flatgeobuf.c +++ b/postgis/flatgeobuf.c @@ -466,8 +466,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx) HeapTuple heapTuple; uint32_t natts = ctx->tupdesc->natts; - Datum *values = palloc0(natts * sizeof(Datum *)); - bool *isnull = palloc0(natts * sizeof(bool *)); + Datum *values = palloc0(natts * sizeof(Datum)); + bool *isnull = palloc0(natts * sizeof(bool)); values[0] = Int32GetDatum(ctx->fid); ----------------------------------------------------------------------- Summary of changes: postgis/flatgeobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 2 07:36:03 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 2 Feb 2026 07:36:03 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.4-19-g3ec6fdb95 Message-ID: <20260202153603.8D8F71A3FB4@trac.osgeo.org> 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, stable-3.5 has been updated via 3ec6fdb951aaec20db3fc35ee274752eeb15d07c (commit) from 7f73a34b1a5ee355d011c8bcb6b0d6faf5e561cc (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 3ec6fdb951aaec20db3fc35ee274752eeb15d07c Author: Maksim Korotkov Date: Mon Feb 2 16:08:43 2026 +0300 Fix memory allocation size for arrays in flatgeobuf_decode_row The original code incorrectly allocated memory for pointers instead of the actual types, potentially causing buffer overflows or memory corruption since it was allocating insufficient memory (size of pointer instead of size of Datum/bool). Found by PostgesPro. Fixes: 3ae2c5844 ("FlatGeobuf format input/output") Signed-off-by: Maksim Korotkov diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c index 9fa5be2b3..52ef420ef 100644 --- a/postgis/flatgeobuf.c +++ b/postgis/flatgeobuf.c @@ -466,8 +466,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx) HeapTuple heapTuple; uint32_t natts = ctx->tupdesc->natts; - Datum *values = palloc0(natts * sizeof(Datum *)); - bool *isnull = palloc0(natts * sizeof(bool *)); + Datum *values = palloc0(natts * sizeof(Datum)); + bool *isnull = palloc0(natts * sizeof(bool)); values[0] = Int32GetDatum(ctx->fid); ----------------------------------------------------------------------- Summary of changes: postgis/flatgeobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 2 07:36:11 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 2 Feb 2026 07:36:11 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-74-g766b1cd54 Message-ID: <20260202153612.41BD01A37D2@trac.osgeo.org> 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, stable-3.4 has been updated via 766b1cd545fd22b398381180bb315ef9bb0e086a (commit) from eaf48fc0d4fcc651fdc924b4b0c732bfba00c22b (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 766b1cd545fd22b398381180bb315ef9bb0e086a Author: Maksim Korotkov Date: Mon Feb 2 16:08:43 2026 +0300 Fix memory allocation size for arrays in flatgeobuf_decode_row The original code incorrectly allocated memory for pointers instead of the actual types, potentially causing buffer overflows or memory corruption since it was allocating insufficient memory (size of pointer instead of size of Datum/bool). Found by PostgesPro. Fixes: 3ae2c5844 ("FlatGeobuf format input/output") Signed-off-by: Maksim Korotkov diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c index 9fa5be2b3..52ef420ef 100644 --- a/postgis/flatgeobuf.c +++ b/postgis/flatgeobuf.c @@ -466,8 +466,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx) HeapTuple heapTuple; uint32_t natts = ctx->tupdesc->natts; - Datum *values = palloc0(natts * sizeof(Datum *)); - bool *isnull = palloc0(natts * sizeof(bool *)); + Datum *values = palloc0(natts * sizeof(Datum)); + bool *isnull = palloc0(natts * sizeof(bool)); values[0] = Int32GetDatum(ctx->fid); ----------------------------------------------------------------------- Summary of changes: postgis/flatgeobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 2 07:36:20 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 2 Feb 2026 07:36:20 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.7-70-g05ba89e6e Message-ID: <20260202153621.03B851A4080@trac.osgeo.org> 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, stable-3.3 has been updated via 05ba89e6e2a9cc3761ea8b21773a6d9fbc9acdd9 (commit) from d5bd4360404cee5cd6b033551b75fa67407904b5 (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 05ba89e6e2a9cc3761ea8b21773a6d9fbc9acdd9 Author: Maksim Korotkov Date: Mon Feb 2 16:08:43 2026 +0300 Fix memory allocation size for arrays in flatgeobuf_decode_row The original code incorrectly allocated memory for pointers instead of the actual types, potentially causing buffer overflows or memory corruption since it was allocating insufficient memory (size of pointer instead of size of Datum/bool). Found by PostgesPro. Fixes: 3ae2c5844 ("FlatGeobuf format input/output") Signed-off-by: Maksim Korotkov diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c index e98d6a65b..b4e2f3340 100644 --- a/postgis/flatgeobuf.c +++ b/postgis/flatgeobuf.c @@ -467,8 +467,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx) HeapTuple heapTuple; uint32_t natts = ctx->tupdesc->natts; - Datum *values = palloc0(natts * sizeof(Datum *)); - bool *isnull = palloc0(natts * sizeof(bool *)); + Datum *values = palloc0(natts * sizeof(Datum)); + bool *isnull = palloc0(natts * sizeof(bool)); values[0] = Int32GetDatum(ctx->fid); ----------------------------------------------------------------------- Summary of changes: postgis/flatgeobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Tue Feb 3 01:33:12 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 3 Feb 2026 01:33:12 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-326-g875ba8eb1 Message-ID: <20260203093312.4CB101AD75F@trac.osgeo.org> 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 875ba8eb1c2782c80ae157e3490790d87470d447 (commit) from 7c7ab9cd551a8edd438ce63b21dffd48351e4c02 (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 875ba8eb1c2782c80ae157e3490790d87470d447 Author: Sandro Santilli Date: Tue Feb 3 10:32:47 2026 +0100 Allow passing build-dir as relative path diff --git a/regress/run_test.pl b/regress/run_test.pl index cac4b2e00..bf7386bbe 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -166,6 +166,8 @@ if ( "${TOP_BUILDDIR}" eq "" ) } } } +# Make sure TOP_BUILDDIR is absolute +$TOP_BUILDDIR=abs_path("${TOP_BUILDDIR}"); # Prepend scripts' build dirs to path # TODO: make this conditional ? ----------------------------------------------------------------------- Summary of changes: regress/run_test.pl | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- PostGIS From trac at osgeo.org Tue Feb 3 04:08:03 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Feb 2026 12:08:03 -0000 Subject: [PostGIS] #5895: Distance Calculation Issue with `ST_DistanceSphere` In-Reply-To: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> References: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> Message-ID: <072.59ea4bf5b1d70c364c91c669eb0d1c48@osgeo.org> #5895: Distance Calculation Issue with `ST_DistanceSphere` ------------------------------+--------------------- Reporter: giovannicimolin | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: Component: postgis | Version: 3.4.x Resolution: | Keywords: ------------------------------+--------------------- Comment (by lnicola): Just found a similar case: {{{ create table us_counties(geog geography not null); insert into us_counties values('MULTIPOLYGON(((-106.195372 40.989938,-106.194231 40.99197,-106.192357 40.993688,-106.190553863626 40.9976070173843,-106.061181 40.996999,-105.77056285729 40.9968997139614,-105.730421 40.996886,-105.724804 40.99691,-105.412718025682 40.9977904880995,-105.277138 40.998173,-105.276859991921 40.99817324279,-105.256527 40.998191,-105.254779 40.99821,-104.943371 40.9980837238089,-104.943127 40.903405,-104.943091 40.884895,-104.943469 40.844088,-104.943337 40.783294,-104.943369 40.740221,-104.943476 40.711295,-104.943543 40.696509,-104.94311 40.696495,-104.943244 40.682254,-104.943484 40.653219,-104.943862 40.638777,-104.944001 40.616785,-104.944091 40.595356,-104.944095 40.58809,-104.94412 40.582431,-104.944019 40.581177,-104.944021 40.580939,-104.944023 40.580824,-104.944113 40.573053,-104.944108 40.566251,-104.944132 40.564294,-104.944135 40.564112,-104.944099 40.563613,-104.944151 40.551715,-104.944186 40.542832,-104.944258 40.522768,-104.944247 40.522663,-104.944213 40.519137,-104.944164 40.508104,-104.944154 40.504925,-104.944147 40.486445,-104.944096 40.4793,-104.944108 40.47636,-104.944116 40.473495,-104.944116 40.473375,-104.944186 40.457026,-104.944257 40.450374,-104.944222 40.435894,-104.944427 40.414196,-104.944562 40.407348,-104.944568 40.406964,-104.944583 40.40651,-104.944605 40.405309,-104.945229 40.370759,-104.945346 40.363476,-104.945551 40.349099,-104.954798 40.349121,-104.955039 40.349121,-104.957356 40.349123,-104.959956 40.349132,-104.961729 40.349138,-104.966444 40.349142,-104.970387 40.349149,-104.980379 40.349171,-104.981291 40.349164,-104.981677 40.349165,-105.002429 40.349217,-105.05672 40.349281,-105.055135 40.335183,-105.055221 40.321045,-105.055326 40.319905,-105.05512 40.308232,-105.055148 40.305264,-105.055162 40.298167,-105.055166 40.296766,-105.055174 40.294532,-105.055175 40.290912,-105.055089 40.269286,-105.055089 40.261793,-105.099937 40.261484,-105.102451 40.261367,-105.110138 40.261284,-105.130179 40.261584,-105.131155 40.261283,-105.142948 40.261283,-105.15906 40.261219,-105.208144 40.261185,-105.212623 40.261185,-105.21483 40.261299,-105.237319 40.261895,-105.289224 40.262781,-105.335177 40.261781,-105.336248 40.261685,-105.336352 40.261685,-105.354747 40.261784,-105.375226 40.261291,-105.390996 40.257884,-105.462752 40.259384,-105.465394 40.259357,-105.495321 40.259726,-105.500481 40.260277,-105.518083 40.260753,-105.535354 40.261284,-105.539455 40.261284,-105.542801 40.26134,-105.56174 40.261507,-105.653321 40.260457,-105.657235 40.262886,-105.66072 40.264228,-105.662378 40.264124,-105.665236 40.266894,-105.667909 40.267718,-105.672055 40.268101,-105.67559 40.267267,-105.678187 40.26812,-105.678903 40.269869,-105.681508 40.271684,-105.682233 40.273164,-105.680347 40.274668,-105.681469 40.279046,-105.679262 40.278912,-105.680732 40.282927,-105.680579 40.28446,-105.685046 40.286409,-105.686346 40.287486,-105.686403 40.288918,-105.68365 40.29119,-105.681165 40.291945,-105.684758 40.292383,-105.687368 40.293733,-105.688272 40.297334,-105.686177 40.303075,-105.689295 40.303479,-105.691278 40.306164,-105.69014 40.308648,-105.691863 40.309373,-105.694834 40.309323,-105.697764 40.310939,-105.700909 40.310715,-105.702109 40.312083,-105.701507 40.314445,-105.700167 40.316364,-105.697648 40.318273,-105.698719 40.32078,-105.70202 40.321711,-105.70168 40.324309,-105.706773 40.325051,-105.713127 40.325568,-105.721438 40.332018,-105.724533 40.3327,-105.729088 40.335278,-105.728786 40.337935,-105.729944 40.339624,-105.733108 40.340774,-105.735441 40.342984,-105.736444 40.344906,-105.736345 40.346615,-105.739613 40.347108,-105.742441 40.349263,-105.747757 40.347508,-105.752383 40.349093,-105.753782 40.35152,-105.757117 40.35165,-105.759271 40.353307,-105.759765 40.355779,-105.763028 40.357118,-105.764441 40.359263,-105.767699 40.359764,-105.769133 40.364474,-105.772596 40.364411,-105.774105 40.365233,-105.774219 40.366759,-105.776437 40.369545,-105.78195 40.373759,-105.78182 40.37699,-105.784997 40.379715,-105.78725 40.380872,-105.788561 40.384282,-105.790729 40.386263,-105.791232 40.387863,-105.790545 40.38964,-105.791664 40.394335,-105.790951 40.39864,-105.793815 40.4008,-105.794182 40.401882,-105.798265 40.405835,-105.800423 40.407218,-105.801294 40.410175,-105.808265 40.414954,-105.811126 40.419399,-105.81534 40.421486,-105.816423 40.423991,-105.817266 40.424323,-105.817231 40.426488,-105.814456 40.428522,-105.814337 40.431334,-105.816366 40.435519,-105.815784 40.437434,-105.813019 40.439161,-105.811728 40.442853,-105.810399 40.443231,-105.806557 40.446202,-105.80569 40.447882,-105.807614 40.452262,-105.805136 40.459233,-105.804479 40.464224,-105.805691 40.4665,-105.80818 40.468868,-105.810669 40.471087,-105.808865 40.471078,-105.807133 40.47241,-105.806793 40.473913,-105.808543 40.475061,-105.812793 40.475855,-105.81542 40.475339,-105.820114 40.475972,-105.822463 40.476829,-105.827956 40.478289,-105.830608 40.479568,-105.834605 40.479869,-105.837823 40.483033,-105.841082 40.483618,-105.843064 40.482994,-105.846967 40.482791,-105.847308 40.483931,-105.854926 40.486252,-105.855822 40.487738,-105.856105 40.490412,-105.855787 40.492682,-105.854773 40.495106,-105.852026 40.497569,-105.851755 40.500475,-105.852297 40.503534,-105.852303 40.506553,-105.854732 40.507789,-105.857058 40.507856,-105.858203 40.509629,-105.860621 40.511549,-105.8619 40.514449,-105.863109 40.515521,-105.866369 40.517257,-105.867513 40.519714,-105.869091 40.520738,-105.871805 40.521748,-105.878048 40.522465,-105.879041 40.523174,-105.881954 40.522853,-105.883852 40.521751,-105.891104 40.521003,-105.894576 40.520196,-105.899111 40.518225,-105.904507 40.514119,-105.907857 40.515493,-105.91078 40.520179,-105.911175 40.522181,-105.909764 40.523452,-105.907868 40.52621,-105.905914 40.530519,-105.905098 40.535361,-105.90715 40.540578,-105.907049 40.542888,-105.909577 40.544982,-105.90951 40.54793,-105.911833 40.552688,-105.909914 40.558806,-105.909784 40.562134,-105.910892 40.56642,-105.91321 40.568313,-105.915032 40.570724,-105.918444 40.5707,-105.921248 40.572559,-105.924977 40.580934,-105.924388 40.582146,-105.926543 40.590589,-105.927697 40.591709,-105.92813 40.600058,-105.929 40.601202,-105.928953 40.603794,-105.930207 40.60619,-105.934711 40.60643,-105.938681 40.608811,-105.942064 40.609077,-105.944535 40.612092,-105.944742 40.614231,-105.947021 40.616689,-105.94511 40.621191,-105.945495 40.622741,-105.947199 40.623746,-105.949261 40.62732,-105.948667 40.630185,-105.948573 40.633678,-105.948062 40.635986,-105.948485 40.642318,-105.950816 40.643289,-105.951079 40.645878,-105.953844 40.646977,-105.954765 40.65021,-105.956686 40.654964,-105.955821 40.658854,-105.957838 40.660874,-105.958639 40.66301,-105.962292 40.666584,-105.965039 40.668207,-105.965114 40.671418,-105.966455 40.673455,-105.966664 40.675681,-105.969392 40.67774,-105.971873 40.681856,-105.970026 40.686265,-105.973584 40.689274,-105.97376 40.691129,-105.972196 40.694811,-105.977085 40.702648,-105.980521 40.703842,-105.982448 40.706692,-105.986021 40.707627,-105.988739 40.709605,-105.989763 40.713982,-105.990077 40.718313,-105.988079 40.721368,-105.989284 40.72352,-105.990939 40.724801,-105.99058 40.72718,-105.991965 40.728919,-105.99627 40.733126,-105.998677 40.734223,-106.000569 40.734337,-106.004026 40.736794,-106.006008 40.737619,-106.00839 40.740064,-106.0107 40.741041,-106.01036 40.742401,-106.012215 40.743946,-106.013978 40.746644,-106.015447 40.750603,-106.015266 40.752816,-106.022255 40.754689,-106.020651 40.757201,-106.020673 40.758429,-106.02388 40.761328,-106.02335 40.763534,-106.024338 40.766296,-106.026643 40.768315,-106.024488 40.771264,-106.029247 40.773436,-106.029566 40.775068,-106.028908 40.777515,-106.031033 40.77787,-106.029685 40.781562,-106.031236 40.782281,-106.03197 40.783767,-106.035211 40.785551,-106.039652 40.78576,-106.04281 40.79013,-106.045371 40.791857,-106.045979 40.796373,-106.044896 40.797682,-106.046694 40.800791,-106.046471 40.802447,-106.047971 40.804643,-106.049587 40.805507,-106.05235 40.805862,-106.051502 40.809141,-106.053288 40.810417,-106.053779 40.812662,-106.055097 40.813631,-106.057798 40.814438,-106.057715 40.81712,-106.062533 40.819509,-106.064831 40.821567,-106.071316 40.822331,-106.073125 40.824633,-106.075306 40.825609,-106.076392 40.827925,-106.077828 40.828498,-106.080861 40.830903,-106.083221 40.831177,-106.087914 40.833403,-106.088596 40.836133,-106.090502 40.837181,-106.092494 40.839781,-106.092686 40.840839,-106.095537 40.841645,-106.09878 40.841699,-106.101261 40.843563,-106.100138 40.84698,-106.098515 40.849736,-106.102442 40.852334,-106.108069 40.852507,-106.106284 40.854075,-106.104281 40.859263,-106.105092 40.860514,-106.107763 40.861368,-106.108404 40.863258,-106.113192 40.864279,-106.116536 40.866441,-106.118971 40.865776,-106.120803 40.867632,-106.123176 40.867501,-106.124647 40.868808,-106.126893 40.869556,-106.127691 40.871785,-106.130671 40.873868,-106.132425 40.876553,-106.12998 40.878213,-106.128251 40.882002,-106.127618 40.88489,-106.128987 40.889281,-106.13143 40.892865,-106.130734 40.895494,-106.131251 40.896608,-106.134102 40.898709,-106.136225 40.899228,-106.136908 40.902028,-106.139286 40.902402,-106.144069 40.9049,-106.147881 40.904638,-106.15069 40.906715,-106.152198 40.906789,-106.154593 40.909421,-106.158551 40.910619,-106.159577 40.912766,-106.158905 40.914266,-106.161166 40.915107,-106.163044 40.916727,-106.16817 40.918398,-106.169485 40.920315,-106.169084 40.922868,-106.170028 40.923804,-106.173435 40.924783,-106.175893 40.928254,-106.179945 40.931521,-106.185307 40.933973,-106.18617 40.936727,-106.187599 40.937745,-106.187166 40.940825,-106.189293 40.945893,-106.187651 40.950166,-106.185629 40.952248,-106.184226 40.955207,-106.186829 40.957425,-106.187391 40.95872,-106.185253 40.961032,-106.184844 40.963831,-106.187701 40.964906,-106.186751 40.968052,-106.187097 40.971167,-106.18973 40.973089,-106.190405 40.976098,-106.19004 40.97864,-106.192139 40.982836,-106.190553 40.984255,-106.191124 40.98603,-106.19494 40.986936,-106.195372 40.989938)))'); select ST_IsValid(geog :: geometry), ST_Distance( geog, ST_Point(-3.35196, 10.18321, 4326) :: geography ), ST_Distance( ST_GeometryN(geog :: geometry, 1) :: geography, ST_Point(-3.35196, 10.18321, 4326) :: geography ), ST_DistanceSphere( geog :: geometry, ST_Point(-3.35196, 10.18321, 4326) ), ST_DistanceSpheroid( geog :: geometry, ST_Point(-3.35196, 10.18321, 4326) ) from us_counties; st_isvalid | st_distance | st_distance | st_distancesphere | st_distancespheroid ------------+-------------+-------------------+-------------------+--------------------- t | 0 | 10230919.83706264 | 0 | 10230919.837062642 (1 row) }}} {{{ POSTGIS="3.6.1 f533623" [EXTENSION] PGSQL="180" GEOS="3.14.1-CAPI-1.20.5" PROJ="9.6.2 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/var/lib/pgsql/.local/share/proj DATABASE_PATH=/usr/share/proj/proj.db" (compiled against PROJ 9.6.2) LIBXML="2.12.10" LIBJSON="0.18" LIBPROTOBUF="1.5.2" WAGYU="0.5.0 (Internal)" (core procs from "3.6.0 4c1967d" need upgrade) }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Tue Feb 3 15:33:42 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Feb 2026 23:33:42 -0000 Subject: [PostGIS] #6040: ST_GeoHash not symmetric Message-ID: <049.6d8f7705b19d0a4f1e2763197defee37@osgeo.org> #6040: ST_GeoHash not symmetric ---------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Keywords: | ---------------------+--------------------------- Geometry that are generated from geohashes cover the geohash cell defined by the geohash. That covering polygon _should_ return the original geohash when fed into ST_GeoHash, but it does not {{{ select st_geohash(st_geomfromgeohash('s0')); -- should be 's0' }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Tue Feb 3 16:01:08 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 3 Feb 2026 16:01:08 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-327-gbf36aef0c Message-ID: <20260204000109.52C1618D5D8@trac.osgeo.org> 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 bf36aef0ca85b254b8576f0936d377612a4668c0 (commit) from 875ba8eb1c2782c80ae157e3490790d87470d447 (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 bf36aef0ca85b254b8576f0936d377612a4668c0 Author: Paul Ramsey Date: Tue Feb 3 15:35:32 2026 -0800 Allow geohash to round-trip to "geohash to geom" and "geom to geohash" circuit without getting collapsed. Applying just to master since a regression test required a change. Closes #6040 diff --git a/NEWS b/NEWS index 43c732569..684606d3a 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ xxxx/xx/xx (old default) to really mean 0 and want -1 (new default) to mean "use topology precision" (Sandro Santilli) - #6024, Remove support for PostgreSQL 12 and 13 (Regina Obe) + - #6040, ST_GeoHash round trip through ST_GeomFromGeoHash (Paul Ramsey) * New Features * diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c index 0a467dfb6..2ddc721da 100644 --- a/liblwgeom/lwalgorithm.c +++ b/liblwgeom/lwalgorithm.c @@ -812,11 +812,11 @@ int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds) latwidth = latmax - latmin; latmaxadjust = lonmaxadjust = latminadjust = lonminadjust = 0.0; - if ( minx > lonmin + lonwidth / 2.0 ) + if ( minx >= lonmin + lonwidth / 2.0 ) { lonminadjust = lonwidth / 2.0; } - else if ( maxx < lonmax - lonwidth / 2.0 ) + else if ( maxx <= lonmax - lonwidth / 2.0 ) { lonmaxadjust = -1 * lonwidth / 2.0; } @@ -833,11 +833,11 @@ int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds) break; } - if ( miny > latmin + latwidth / 2.0 ) + if ( miny >= latmin + latwidth / 2.0 ) { latminadjust = latwidth / 2.0; } - else if (maxy < latmax - latwidth / 2.0 ) + else if (maxy <= latmax - latwidth / 2.0 ) { latmaxadjust = -1 * latwidth / 2.0; } diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected index 76ea65e71..b8b5e345c 100644 --- a/regress/core/tickets_expected +++ b/regress/core/tickets_expected @@ -421,8 +421,8 @@ ERROR: BOX2D_construct: args can not be empty points #4399|ST_AsX3D|0 0 1 1 0 1 #4399|ST_AsX3D| #4399|ST_AsX3D| -#4399|ST_GeoHash| -#4399|ST_GeoHash| +#4399|ST_GeoHash|s00 +#4399|ST_GeoHash|s00 #4399|ST_GeoHash| #4399|ST_AsGeoJSON|{"type":"Polygon","coordinates":[[[0,0],[1,1],[0,1],[0,0]]]} #4399|ST_AsGeoJSON|{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[0,0],[1,1],[0,1],[0,0]]]}]} ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + liblwgeom/lwalgorithm.c | 8 ++++---- regress/core/tickets_expected | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Tue Feb 3 16:01:12 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Feb 2026 00:01:12 -0000 Subject: [PostGIS] #6040: ST_GeoHash not symmetric In-Reply-To: <049.6d8f7705b19d0a4f1e2763197defee37@osgeo.org> References: <049.6d8f7705b19d0a4f1e2763197defee37@osgeo.org> Message-ID: <064.7b668c270cd46fe8e6b79b300c681013@osgeo.org> #6040: ST_GeoHash not symmetric ----------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Resolution: fixed | Keywords: ----------------------+--------------------------- Changes (by Paul Ramsey ): * resolution: => fixed * status: new => closed Comment: In [changeset:"bf36aef0ca85b254b8576f0936d377612a4668c0/git" bf36aef0/git]: {{{#!CommitTicketReference repository="git" revision="bf36aef0ca85b254b8576f0936d377612a4668c0" Allow geohash to round-trip to "geohash to geom" and "geom to geohash" circuit without getting collapsed. Applying just to master since a regression test required a change. Closes #6040 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 4 08:01:17 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Feb 2026 16:01:17 -0000 Subject: [PostGIS] #6040: ST_GeoHash not idempotent (was: ST_GeoHash not symmetric) In-Reply-To: <049.6d8f7705b19d0a4f1e2763197defee37@osgeo.org> References: <049.6d8f7705b19d0a4f1e2763197defee37@osgeo.org> Message-ID: <064.f3d4ca116096f8089feb6370d249ee54@osgeo.org> #6040: ST_GeoHash not idempotent ----------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Resolution: fixed | Keywords: ----------------------+--------------------------- Changes (by pramsey): * summary: ST_GeoHash not symmetric => ST_GeoHash not idempotent -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 4 20:21:56 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 04:21:56 -0000 Subject: [PostGIS] #5790: Postgis-functions in Materialized views fail in Postgres 17 due to not fully qualified search path In-Reply-To: <047.90df15410697a6cb181cc7a3c9438a1d@osgeo.org> References: <047.90df15410697a6cb181cc7a3c9438a1d@osgeo.org> Message-ID: <062.47c7007f3c215a2311b4df26f44bf9e7@osgeo.org> #5790: Postgis-functions in Materialized views fail in Postgres 17 due to not fully qualified search path ----------------------+--------------------------- Reporter: maxbo | Owner: robe Type: defect | Status: closed Priority: high | Milestone: PostGIS 3.4.4 Component: postgis | Version: 3.4.x Resolution: fixed | Keywords: ----------------------+--------------------------- Comment (by robe): @landry, I have one additional thought about this, given that the issue sounds intermittent at least in psql (always fails pn pyschopg), it just occurred to me that ST_EstimatedExtent is very sensitive to vacuum analyze process. I would really avoid using it in a materialized view if you can. My thought is maybe depending on the frequency of your updates/delete/inserts to this table, it could be all over the place and even at times perhaps just return garbage. I haven't dug deep into the function to see what it is doing. But based on your error message, I gather it is failing here - https://gitea.osgeo.org/postgis/postgis/src/commit/3ec6fdb951aaec20db3fc35ee274752eeb15d07c/postgis/gserialized_estimate.c#L2493 @pramsey have any thoughts on this why a geometry data type would suddenly turn invalid? To get a more predictable answer, and perhaps it might even solve your issue, try redoing your materialized view as below, though you will suffer a performance penalty. Depending on the size of your public.pictures and the number of cpus you have, the performance penalty may be acceptable and the behavior would be more predictable {{{ CREATE MATERIALIZED VIEW test_grid AS SELECT row_number() OVER() AS id, g.geom FROM (SELECT ST_SetSRID(ST_Extent(geom), 4326) AS ext FROM public.pictures) AS t CROSS JOIN LATERAL ST_SquareGrid( 0.1, t.ext ) AS g; }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 4 20:42:00 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 04:42:00 -0000 Subject: [PostGIS] #6009: Error of ST_Polygon(raster) function in PostGIS 3.4.3 and 3.5.4 In-Reply-To: <053.5b0683b43da79bf5e5b9011a9047b449@osgeo.org> References: <053.5b0683b43da79bf5e5b9011a9047b449@osgeo.org> Message-ID: <068.894496e35a5bbdc21e969fad6284924c@osgeo.org> #6009: Error of ST_Polygon(raster) function in PostGIS 3.4.3 and 3.5.4 -------------------------+------------------------------------------------- Reporter: | Owner: robe GISuser5432 | Type: defect | Status: closed Priority: high | Milestone: PostGIS 3.5.5 Component: raster | Version: 3.5.x Resolution: worksforme | Keywords: PostGIS_Raster; Raster; | ST_Polygon(Raster) -------------------------+------------------------------------------------- Changes (by robe): * resolution: => worksforme * status: new => closed -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 4 20:44:01 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 04:44:01 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.230b5e2273354dc564affce2334c974e@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by robe): Replying to [comment:6 evsi]: > Hi, out of curiosity, is there a reason this fix was not applied to the 3.5 and older branches? This ticket looks tagged for 3.5.x. I plan to. Just haven't gotten around to it yet. But should in next couple of days. It's harder with older branches since the patch does not generally apply cleanly. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Wed Feb 4 21:05:32 2026 From: git at osgeo.org (git at osgeo.org) Date: Wed, 4 Feb 2026 21:05:32 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.1 updated. 3.1.11-47-g0051d330b Message-ID: <20260205050533.8F0C7193FAD@trac.osgeo.org> 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, stable-3.1 has been updated via 0051d330b2697d1218db44ad4d5c26c9c9aff3a2 (commit) from d4ba80220e80650b112fafa201b0deea95b5c875 (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 0051d330b2697d1218db44ad4d5c26c9c9aff3a2 Author: Regina Obe Date: Thu Feb 5 00:04:09 2026 -0500 Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.1.13 diff --git a/NEWS b/NEWS index 6df4cf20a..da155622d 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ YYYY/MM/DD - #5991, CircularString distance error (Paul Ramsey) - #5962, Consistent clipping of MULTI/POINT (Paul Ramsey) - #6028, Crash indexing malformed empty polygon (Paul Ramsey) + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension PostGIS 3.1.12 diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 12a395b60..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql index 2343fe15c..01c81f26a 100644 --- a/extras/tiger_geocoder/tiger_loader_2020.sql +++ b/extras/tiger_geocoder/tiger_loader_2020.sql @@ -2,7 +2,7 @@ -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.net -- --- Copyright (C) 2012-2021 Regina Obe and Leo Hsu +-- Copyright (C) 2012-2018 Regina Obe and Leo Hsu -- Paragon Corporation -- -- This is free software; you can redistribute and/or modify it under @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -165,18 +231,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -232,9 +294,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -245,8 +305,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -256,7 +315,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; @@ -275,8 +333,9 @@ COMMENT ON COLUMN loader_lookuptables.website_root_override IS 'Path to use for INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(10, 'tract', 'tract', true, false, true,false, 'c', '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tract_id) ) INHERITS(tiger.${lookup_name}); " ', - '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO tract_id;" - ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid IF EXISTS TO tract_id; + ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 IF EXISTS TO tract_id; + SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid']); @@ -291,7 +350,7 @@ ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_ ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) -VALUES(11, 'tabblock20', 'tabblock20', false, false, true,false, 'c', +VALUES(11, 'tabblock20', 'tabblock20', true, false, true,false, 'c', '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (geoid)) INHERITS(tiger.${lookup_name});" ', '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" ----------------------------------------------------------------------- Summary of changes: NEWS | 2 + .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 +++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2013.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2014.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2015.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2016.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2017.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2018.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2019.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2020.sql | 91 ++++++++++++++++++---- 11 files changed, 514 insertions(+), 112 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Wed Feb 4 21:05:47 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 05:05:47 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.f3d2c02cc574f688094550624fc7128a@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"0051d330b2697d1218db44ad4d5c26c9c9aff3a2/git" 0051d330/git]: {{{#!CommitTicketReference repository="git" revision="0051d330b2697d1218db44ad4d5c26c9c9aff3a2" Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.1.13 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Wed Feb 4 21:15:53 2026 From: git at osgeo.org (git at osgeo.org) Date: Wed, 4 Feb 2026 21:15:53 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.11-23-g89467dc26 Message-ID: <20260205051554.753BD193FFA@trac.osgeo.org> 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, stable-3.0 has been updated via 89467dc26d9e4d9bfc7d6d47372970997696e194 (commit) via 2f87c5be808d3a969a3fa101290715ab6bb53496 (commit) from 8736b619abe7f5c75848521b03e2e626e58d3e01 (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 89467dc26d9e4d9bfc7d6d47372970997696e194 Author: Regina Obe Date: Thu Feb 5 00:14:53 2026 -0500 Get rid of dronie config diff --git a/.drone-1.0.yml b/.drone-1.0.yml deleted file mode 100644 index 52e04cf11..000000000 --- a/.drone-1.0.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is for the drone 1.0 agent -# https://docs.drone.io/user-guide/pipeline/steps/ -# https://dronie.osgeo.org #1.0 server - -# See https://git.osgeo.org/gitea/postgis/postgis-docker -# todo: add docker images from https://hub.docker.com/r/postgis/postgis-build-env/tags/ -test-image: &test-image docker.osgeo.org/postgis/build-test:trisquel2 -clone: &clone - image: plugins/git - depth: 20 - recursive: false - -kind: pipeline -name: build -clone: *clone -steps: - - - name: build-10 - image: *test-image - pull: always - commands: - - PGVER=10 sh ci/dronie/postgis_regress.sh - - - name: build-13 - image: *test-image - pull: always - commands: - - PGVER=13 sh ci/dronie/postgis_regress.sh -... commit 2f87c5be808d3a969a3fa101290715ab6bb53496 Author: Regina Obe Date: Thu Feb 5 00:11:45 2026 -0500 TIGER EXTENSION SECURITY fix Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.0.12 diff --git a/NEWS b/NEWS index 1a7c37d08..d2daeb585 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.0.12dev -xxxx/xx/xx +PostGIS 3.0.12 (EOL) +2026/02/xx PostgreSQL 9.5-13 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. @@ -13,6 +13,8 @@ Proj 4.9+ required. - Handle null returns from wkb parser, Paul Ramsey - #5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) - #6028, Crash indexing malformed empty polygon (Paul Ramsey) + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension PostGIS 3.0.11 diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 3fce651ff..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -123,12 +189,11 @@ CREATE OR REPLACE FUNCTION drop_state_tables_generate_script(param_state text, p $$ SELECT array_to_string(array_agg('DROP TABLE ' || quote_ident(table_schema) || '.' || quote_ident(table_name) || ';'),E'\n') FROM (SELECT * FROM information_schema.tables - WHERE table_schema = $2 AND table_name like lower($1) || '~_%' ESCAPE '~' ORDER BY table_name) AS foo; + WHERE table_schema = $2 AND table_name like lower($1) || '_%' ORDER BY table_name) AS foo; ; $$ LANGUAGE sql VOLATILE; - -- Helper function that generates script to drop all nation tables (county, state) in a particular schema -- This is useful for loading 2011 because state and county tables aren't broken out into separate state files DROP FUNCTION IF EXISTS drop_national_tables_generate_script(text); @@ -145,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; ----------------------------------------------------------------------- Summary of changes: .drone-1.0.yml | 29 -------- NEWS | 6 +- .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 +++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2013.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2014.sql | 82 ++++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2015.sql | 82 ++++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2016.sql | 82 ++++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2017.sql | 82 ++++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2018.sql | 82 ++++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2019.sql | 85 ++++++++++++++++++---- 11 files changed, 442 insertions(+), 129 deletions(-) delete mode 100644 .drone-1.0.yml hooks/post-receive -- PostGIS From trac at osgeo.org Wed Feb 4 21:15:59 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 05:15:59 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.8c2fa5e8b538c05be2e6a3e007e560c1@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"2f87c5be808d3a969a3fa101290715ab6bb53496/git" 2f87c5be/git]: {{{#!CommitTicketReference repository="git" revision="2f87c5be808d3a969a3fa101290715ab6bb53496" TIGER EXTENSION SECURITY fix Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.0.12 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 4 23:49:04 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 07:49:04 -0000 Subject: [PostGIS] #5790: Postgis-functions in Materialized views fail in Postgres 17 due to not fully qualified search path In-Reply-To: <047.90df15410697a6cb181cc7a3c9438a1d@osgeo.org> References: <047.90df15410697a6cb181cc7a3c9438a1d@osgeo.org> Message-ID: <062.9ddc51ed5f2795ece02e788919a1b622@osgeo.org> #5790: Postgis-functions in Materialized views fail in Postgres 17 due to not fully qualified search path ----------------------+--------------------------- Reporter: maxbo | Owner: robe Type: defect | Status: closed Priority: high | Milestone: PostGIS 3.4.4 Component: postgis | Version: 3.4.x Resolution: fixed | Keywords: ----------------------+--------------------------- Comment (by landry): yeah, looking at the code that's also where i supposed it was failing, and then i started looking at how postgis/postgresql gathers available types, and got lost in the maze.. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Thu Feb 5 11:11:02 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Feb 2026 19:11:02 -0000 Subject: [PostGIS] #5895: Distance Calculation Issue with `ST_DistanceSphere` In-Reply-To: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> References: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> Message-ID: <072.749ea0ce18ca05788746d398ec32644b@osgeo.org> #5895: Distance Calculation Issue with `ST_DistanceSphere` ------------------------------+--------------------- Reporter: giovannicimolin | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: Component: postgis | Version: 3.4.x Resolution: | Keywords: ------------------------------+--------------------- Comment (by pramsey): Operating system and hardware architecture? Unfortunately all the above tests are working fine for me, MacOS/ARM -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Thu Feb 5 16:03:59 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Feb 2026 16:03:59 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-328-g760c7eb39 Message-ID: <20260206000359.4B6A01B39A2@trac.osgeo.org> 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 760c7eb3951d48547c947f00cac81bc1e2ad397a (commit) from bf36aef0ca85b254b8576f0936d377612a4668c0 (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 760c7eb3951d48547c947f00cac81bc1e2ad397a Author: Paul Ramsey Date: Thu Feb 5 16:03:49 2026 -0800 Remove dead spherical code diff --git a/postgis/lwgeom_spheroid.c b/postgis/lwgeom_spheroid.c index 8c11edff5..572470fe2 100644 --- a/postgis/lwgeom_spheroid.c +++ b/postgis/lwgeom_spheroid.c @@ -44,12 +44,6 @@ #define SHOW_DIGS_DOUBLE 15 #define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 6 + 1 + 3 +1) -/* - * distance from -126 49 to -126 49.011096139863 - * in 'SPHEROID["GRS_1980",6378137,298.257222101]' - * is 1234.000 - */ - /* PG-exposed */ Datum ellipsoid_in(PG_FUNCTION_ARGS); @@ -60,15 +54,6 @@ Datum LWGEOM_distance_ellipsoid(PG_FUNCTION_ARGS); Datum LWGEOM_distance_sphere(PG_FUNCTION_ARGS); Datum geometry_distance_spheroid(PG_FUNCTION_ARGS); -/* internal */ -double distance_sphere_method(double lat1, double long1,double lat2,double long2, SPHEROID *sphere); -double distance_ellipse_calculation(double lat1, double long1, double lat2, double long2, SPHEROID *sphere); -double distance_ellipse(double lat1, double long1, double lat2, double long2, SPHEROID *sphere); -double deltaLongitude(double azimuth, double sigma, double tsm,SPHEROID *sphere); -double mu2(double azimuth,SPHEROID *sphere); -double bigA(double u2); -double bigB(double u2); - /* * Use the WKT definition of an ellipsoid @@ -131,196 +116,6 @@ Datum ellipsoid_out(PG_FUNCTION_ARGS) PG_RETURN_CSTRING(result); } -/* - * support function for distance calc - * code is taken from David Skea - * Geographic Data BC, Province of British Columbia, Canada. - * Thanks to GDBC and David Skea for allowing this to be - * put in PostGIS. - */ -double -deltaLongitude(double azimuth, double sigma, double tsm,SPHEROID *sphere) -{ - /* compute the expansion C */ - double das,C; - double ctsm,DL; - - das = cos(azimuth)*cos(azimuth); - C = sphere->f/16.0 * das * (4.0 + sphere->f * (4.0 - 3.0 * das)); - - /* compute the difference in longitude */ - ctsm = cos(tsm); - DL = ctsm + C * cos(sigma) * (-1.0 + 2.0 * ctsm*ctsm); - DL = sigma + C * sin(sigma) * DL; - return (1.0 - C) * sphere->f * sin(azimuth) * DL; -} - - -/* - * support function for distance calc - * code is taken from David Skea - * Geographic Data BC, Province of British Columbia, Canada. - * Thanks to GDBC and David Skea for allowing this to be - * put in PostGIS. - */ -double -mu2(double azimuth,SPHEROID *sphere) -{ - double e2; - - e2 = sqrt(sphere->a*sphere->a-sphere->b*sphere->b)/sphere->b; - return cos(azimuth)*cos(azimuth) * e2*e2; -} - - -/* - * Support function for distance calc - * code is taken from David Skea - * Geographic Data BC, Province of British Columbia, Canada. - * Thanks to GDBC and David Skea for allowing this to be - * put in PostGIS. - */ -double -bigA(double u2) -{ - return 1.0 + u2/256.0 * (64.0 + u2 * (-12.0 + 5.0 * u2)); -} - - -/* - * Support function for distance calc - * code is taken from David Skea - * Geographic Data BC, Province of British Columbia, Canada. - * Thanks to GDBC and David Skea for allowing this to be - * put in PostGIS. - */ -double -bigB(double u2) -{ - return u2/512.0 * (128.0 + u2 * (-64.0 + 37.0 * u2)); -} - - - -double -distance_ellipse(double lat1, double long1, - double lat2, double long2, SPHEROID *sphere) -{ - double result = 0; -#if POSTGIS_DEBUG_LEVEL >= 4 - double result2 = 0; -#endif - - if ( (lat1==lat2) && (long1 == long2) ) - { - return 0.0; /* same point, therefore zero distance */ - } - - result = distance_ellipse_calculation(lat1,long1,lat2,long2,sphere); - -#if POSTGIS_DEBUG_LEVEL >= 4 - result2 = distance_sphere_method(lat1, long1,lat2,long2, sphere); - - POSTGIS_DEBUGF(4, "delta = %lf, skae says: %.15lf,2 circle says: %.15lf", - (result2-result),result,result2); - POSTGIS_DEBUGF(4, "2 circle says: %.15lf",result2); -#endif - - if (result != result) /* NaN check - * (x==x for all x except NaN by IEEE definition) - */ - { - result = distance_sphere_method(lat1, long1, - lat2,long2, sphere); - } - - return result; -} - -/* - * Given 2 lat/longs and ellipse, find the distance - * note original r = 1st, s=2nd location - */ -double -distance_ellipse_calculation(double lat1, double long1, - double lat2, double long2, SPHEROID *sphere) -{ - /* - * Code is taken from David Skea - * Geographic Data BC, Province of British Columbia, Canada. - * Thanks to GDBC and David Skea for allowing this to be - * put in PostGIS. - */ - - double L1,L2,sinU1,sinU2,cosU1,cosU2; - double dl,dl1,dl2,dl3,cosdl1,sindl1; - double cosSigma,sigma,azimuthEQ,tsm; - double u2,A,B; - double dsigma; - - double TEMP; - - int iterations; - - - L1 = atan((1.0 - sphere->f ) * tan( lat1) ); - L2 = atan((1.0 - sphere->f ) * tan( lat2) ); - sinU1 = sin(L1); - sinU2 = sin(L2); - cosU1 = cos(L1); - cosU2 = cos(L2); - - dl = long2- long1; - dl1 = dl; - cosdl1 = cos(dl); - sindl1 = sin(dl); - iterations = 0; - do - { - cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosdl1; - sigma = acos(cosSigma); - azimuthEQ = asin((cosU1 * cosU2 * sindl1)/sin(sigma)); - - /* - * Patch from Patrica Tozer to handle minor - * mathematical stability problem - */ - TEMP = cosSigma - (2.0 * sinU1 * sinU2)/ - (cos(azimuthEQ)*cos(azimuthEQ)); - if (TEMP > 1) - { - TEMP = 1; - } - else if (TEMP < -1) - { - TEMP = -1; - } - tsm = acos(TEMP); - - - /* (old code?) - tsm = acos(cosSigma - (2.0 * sinU1 * sinU2)/(cos(azimuthEQ)*cos(azimuthEQ))); - */ - - dl2 = deltaLongitude(azimuthEQ, sigma, tsm,sphere); - dl3 = dl1 - (dl + dl2); - dl1 = dl + dl2; - cosdl1 = cos(dl1); - sindl1 = sin(dl1); - iterations++; - } - while ( (iterations<999) && (fabs(dl3) > 1.0e-032)); - - /* compute expansions A and B */ - u2 = mu2(azimuthEQ,sphere); - A = bigA(u2); - B = bigB(u2); - - /* compute length of geodesic */ - dsigma = B * sin(sigma) * (cos(tsm) + - (B*cosSigma*(-1.0 + 2.0 * (cos(tsm)*cos(tsm))))/4.0); - return sphere->b * (A * (sigma - dsigma)); -} /* @@ -385,95 +180,6 @@ Datum LWGEOM_length_ellipsoid_linestring(PG_FUNCTION_ARGS) PG_RETURN_FLOAT8(length); } -/* - * For some lat/long points, the above method doesn't calculate the distance very well. - * Typically this is for two lat/long points that are very very close together (<10cm). - * This gets worse closer to the equator. - * - * This method works very well for very close together points, not so well if they're - * far away (>1km). - * - * METHOD: - * We create two circles (with Radius R and Radius S) and use these to calculate the distance. - * - * The first (R) is basically a (north-south) line of longitude. - * Its radius is approximated by looking at the ellipse. Near the equator R = 'a' (earth's major axis) - * near the pole R = 'b' (earth's minor axis). - * - * The second (S) is basically a (east-west) line of latitude. - * Its radius runs from 'a' (major axis) at the equator, and near 0 at the poles. - * - * - * North pole - * * - * * - * *\--S-- - * * R + - * * \ + - * * A\ + - * * ------ \ Equator/centre of earth - * * - * * - * * - * * - * * - * * - * South pole - * (side view of earth) - * - * Angle A is lat1 - * R is the distance from the centre of the earth to the lat1/long1 point on the surface - * of the Earth. - * S is the circle-of-latitude. Its calculated from the right triangle defined by - * the angle (90-A), and the hypotenuse R. - * - * - * - * Once R and S have been calculated, the actual distance between the two points can be - * calculated. - * - * We dissolve the vector from lat1,long1 to lat2,long2 into its X and Y components (called DeltaX,DeltaY). - * The actual distance that these angle-based measurements represent is taken from the two - * circles we just calculated; R (for deltaY) and S (for deltaX). - * - * (if deltaX is 1 degrees, then that distance represents 1/360 of a circle of radius S.) - * - * - * Parts taken from PROJ - geodetic_to_geocentric() (for calculating Rn) - * - * remember that lat1/long1/lat2/long2 are coming in a *RADIANS* not degrees. - * - * By Patricia Tozer and Dave Blasby - * - * This is also called the "curvature method". - */ - -double distance_sphere_method(double lat1, double long1,double lat2,double long2, SPHEROID *sphere) -{ - double R,S,X,Y,deltaX,deltaY; - - double distance = 0.0; - double sin_lat = sin(lat1); - double sin2_lat = sin_lat * sin_lat; - - double Geocent_a = sphere->a; - double Geocent_e2 = sphere->e_sq; - - R = Geocent_a / (sqrt(1.0e0 - Geocent_e2 * sin2_lat)); - /* 90 - lat1, but in radians */ - S = R * sin(M_PI_2 - lat1) ; - - deltaX = long2 - long1; /* in rads */ - deltaY = lat2 - lat1; /* in rads */ - - /* think: a % of 2*pi*S */ - X = deltaX/(2.0*M_PI) * 2 * M_PI * S; - Y = deltaY/(2.0*M_PI) * 2 * M_PI * R; - - distance = sqrt((X * X + Y * Y)); - - return distance; -} /* * distance (geometry,geometry, sphere) ----------------------------------------------------------------------- Summary of changes: postgis/lwgeom_spheroid.c | 294 ---------------------------------------------- 1 file changed, 294 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Thu Feb 5 16:23:36 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Feb 2026 16:23:36 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-329-gcbc0c3ae7 Message-ID: <20260206002337.2AFA01B4439@trac.osgeo.org> 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 cbc0c3ae7bc093ede5451d64f00486b4d02f0c08 (commit) from 760c7eb3951d48547c947f00cac81bc1e2ad397a (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 cbc0c3ae7bc093ede5451d64f00486b4d02f0c08 Author: Paul Ramsey Date: Thu Feb 5 16:23:18 2026 -0800 Make SFCGAL regress test invariant to singleton/multi output diff --git a/sfcgal/regress/alphashape.sql b/sfcgal/regress/alphashape.sql index 23dcee024..6f3d18fc3 100644 --- a/sfcgal/regress/alphashape.sql +++ b/sfcgal/regress/alphashape.sql @@ -1,9 +1,9 @@ SELECT 'CG_AlphaShape_default', - ST_AsText(CG_AlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))')); + ST_AsText(ST_Normalize(ST_Multi(CG_AlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))'))),2); SELECT 'CG_AlphaShape_hole', - ST_AsText(CG_AlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))', allow_holes => true)); + ST_AsText(ST_Normalize(ST_Multi(CG_AlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))', allow_holes => true))),2); SELECT 'CG_OptimalAlphaShape_default', - ST_AsText(CG_OptimalAlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))')); + ST_AsText(ST_Normalize(ST_Multi(CG_OptimalAlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))'))),2); SELECT 'CG_OptimalAlphaShape_hole', - ST_AsText(CG_OptimalAlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))', allow_holes => true)); + ST_AsText(ST_Normalize(ST_Multi(CG_OptimalAlphaShape('MultiPoint ((6.3 8.4),(7.6 8.8),(6.8 7.3),(5.3 1.8),(9.1 5),(8.1 7),(8.8 2.9),(2.4 8.2),(3.2 5.1),(3.7 2.3),(2.7 5.4),(8.4 1.9),(7.5 8.7),(4.4 4.2),(7.7 6.7),(9 3),(3.6 6.1),(3.2 6.5),(8.1 4.7),(8.8 5.8),(6.8 7.3),(4.9 9.5),(8.1 6),(8.7 5),(7.8 1.6),(7.9 2.1),(3 2.2),(7.8 4.3),(2.6 8.5),(4.8 3.4),(3.5 3.5),(3.6 4),(3.1 7.9),(8.3 2.9),(2.7 8.4),(5.2 9.8),(7.2 9.5),(8.5 7.1),(7.5 8.4),(7.5 7.7),(8.1 2.9),(7.7 7.3),(4.1 4.2),(8.3 7.2),(2.3 3.6),(8.9 5.3),(2.7 5.7),(5.7 9.7),(2.7 7.7),(3.9 8.8),(6 8.1),(8 7.2),(5.4 3.2),(5.5 2.6),(6.2 2.2),(7 2),(7.6 2.7),(8.4 3.5),(8.7 4.2),(8.2 5.4),(8.3 6.4),(6.9 8.6),(6 9),(5 8.6),(4.3 8),(3.6 7.3),(3.6 6.8),(4 7.5),(2.4 6.7),(2.3 6),(2.6 4.4),(2.8 3.3),(4 3.2),(4.3 1.9),(6.5 1.6),(7.3 1.6),(3.8 4.6),(3.1 5.9),(3.4 8.6),(4.5 9),(6.4 9.7))', allow_holes => true))),2); diff --git a/sfcgal/regress/alphashape_expected b/sfcgal/regress/alphashape_expected index 4e3a2c5b3..6f24a3db0 100644 --- a/sfcgal/regress/alphashape_expected +++ b/sfcgal/regress/alphashape_expected @@ -1,4 +1,4 @@ -CG_AlphaShape_default|POLYGON((8.9 5.3,9.1 5,8.7 4.2,9 3,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,8.3 7.2,8.5 7.1,8.8 5.8,8.9 5.3)) -CG_AlphaShape_hole|POLYGON((8.9 5.3,9.1 5,8.7 4.2,9 3,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,8.3 7.2,8.5 7.1,8.8 5.8,8.9 5.3),(3.6 6.1,3.6 6.8,4 7.5,4.3 8,6 8.1,6.8 7.3,7.7 6.7,8.1 6,8.2 5.4,8.1 4.7,7.8 4.3,7.6 2.7,6.2 2.2,5.4 3.2,4.4 4.2,3.8 4.6,3.6 6.1)) -CG_OptimalAlphaShape_default|POLYGON((8.9 5.3,9.1 5,8.7 4.2,9 3,8.8 2.9,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,7.5 7.7,8.3 7.2,8.5 7.1,8.3 6.4,8.8 5.8,8.9 5.3)) -CG_OptimalAlphaShape_hole|POLYGON((8.9 5.3,9.1 5,8.7 4.2,9 3,8.8 2.9,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,7.5 7.7,8.3 7.2,8.5 7.1,8.3 6.4,8.8 5.8,8.9 5.3),(3.6 6.1,3.6 6.8,4 7.5,4.3 8,5 8.6,6 8.1,6.8 7.3,7.7 6.7,8.1 6,8.2 5.4,8.1 4.7,7.8 4.3,8.1 2.9,7.6 2.7,7 2,6.2 2.2,5.5 2.6,5.4 3.2,4.8 3.4,4.4 4.2,3.8 4.6,3.6 6.1)) +CG_AlphaShape_default|MULTIPOLYGON(((2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,8.3 7.2,8.5 7.1,8.8 5.8,8.9 5.3,9.1 5,8.7 4.2,9 3,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6))) +CG_AlphaShape_hole|MULTIPOLYGON(((2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,8.3 7.2,8.5 7.1,8.8 5.8,8.9 5.3,9.1 5,8.7 4.2,9 3,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6),(3.6 6.1,3.8 4.6,4.4 4.2,5.4 3.2,6.2 2.2,7.6 2.7,7.8 4.3,8.1 4.7,8.2 5.4,8.1 6,7.7 6.7,6.8 7.3,6 8.1,4.3 8,4 7.5,3.6 6.8,3.6 6.1))) +CG_OptimalAlphaShape_default|MULTIPOLYGON(((2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,7.5 7.7,8.3 7.2,8.5 7.1,8.3 6.4,8.8 5.8,8.9 5.3,9.1 5,8.7 4.2,9 3,8.8 2.9,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6))) +CG_OptimalAlphaShape_hole|MULTIPOLYGON(((2.3 3.6,2.6 4.4,2.7 5.4,2.3 6,2.4 6.7,2.7 7.7,2.4 8.2,2.6 8.5,3.4 8.6,3.9 8.8,4.5 9,4.9 9.5,5.2 9.8,5.7 9.7,6.4 9.7,7.2 9.5,7.6 8.8,7.5 8.4,7.5 7.7,8.3 7.2,8.5 7.1,8.3 6.4,8.8 5.8,8.9 5.3,9.1 5,8.7 4.2,9 3,8.8 2.9,8.4 1.9,7.8 1.6,7.3 1.6,6.5 1.6,5.3 1.8,4.3 1.9,3.7 2.3,3 2.2,2.8 3.3,2.3 3.6),(3.6 6.1,3.8 4.6,4.4 4.2,4.8 3.4,5.4 3.2,5.5 2.6,6.2 2.2,7 2,7.6 2.7,8.1 2.9,7.8 4.3,8.1 4.7,8.2 5.4,8.1 6,7.7 6.7,6.8 7.3,6 8.1,5 8.6,4.3 8,4 7.5,3.6 6.8,3.6 6.1))) ----------------------------------------------------------------------- Summary of changes: sfcgal/regress/alphashape.sql | 8 ++++---- sfcgal/regress/alphashape_expected | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Thu Feb 5 23:28:28 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 06 Feb 2026 07:28:28 -0000 Subject: [PostGIS] #5895: Distance Calculation Issue with `ST_DistanceSphere` In-Reply-To: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> References: <057.cc508822a8e6a9eaa70a2081ad54626f@osgeo.org> Message-ID: <072.c9bbf605407804a267aa0abe66fe374c@osgeo.org> #5895: Distance Calculation Issue with `ST_DistanceSphere` ------------------------------+--------------------- Reporter: giovannicimolin | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: Component: postgis | Version: 3.4.x Resolution: | Keywords: ------------------------------+--------------------- Comment (by robe): Replying to [comment:3 pramsey]: > Operating system and hardware architecture? Unfortunately all the above tests are working fine for me, MacOS/ARM Wow that's annoying. It fails for me on my Ubuntu 24.04 apt.postgresql.org shipped PG18 and my windows {{{ POSTGIS="3.6.1 3.6.1" [EXTENSION] PGSQL="180" GEOS="3.14.1-CAPI-1.20.5" PROJ="8.2.1 }}} I guess it only works on ARM. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Thu Feb 5 23:50:36 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Feb 2026 23:50:36 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.4-20-g50e75f968 Message-ID: <20260206075036.ED65B1B7ECB@trac.osgeo.org> 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, stable-3.5 has been updated via 50e75f9684758b1e1b9d8810395b1cbef3d18d60 (commit) from 3ec6fdb951aaec20db3fc35ee274752eeb15d07c (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 50e75f9684758b1e1b9d8810395b1cbef3d18d60 Author: Regina Obe Date: Tue Oct 7 18:27:17 2025 -0400 TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) - Don't create tiger_data as that gets created on first load of data and shouldn't be part of the extension References #5998 for PostGIS 3.5.5 diff --git a/NEWS b/NEWS index fc3dc793a..e2ad1cad2 100644 --- a/NEWS +++ b/NEWS @@ -12,7 +12,8 @@ PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required. - #6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) - #6028, crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension PostGIS 3.5.4 2025/10/16 diff --git a/extras/tiger_geocoder/geocode_settings.sql b/extras/tiger_geocoder/geocode_settings.sql index e126f825b..e5c09b8c2 100644 --- a/extras/tiger_geocoder/geocode_settings.sql +++ b/extras/tiger_geocoder/geocode_settings.sql @@ -22,10 +22,16 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'geocode_settings') THEN CREATE TABLE geocode_settings(name text primary key, setting text, unit text, category text, short_desc text); GRANT SELECT ON geocode_settings TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS geocode_settings(name text primary key, setting text, unit text, category text, short_desc text); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'geocode_settings_default') THEN CREATE TABLE geocode_settings_default(name text primary key, setting text, unit text, category text, short_desc text); GRANT SELECT ON geocode_settings_default TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS geocode_settings_default(name text primary key, setting text, unit text, category text, short_desc text); END IF; --recreate defaults TRUNCATE TABLE geocode_settings_default; diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 12a395b60..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql index 6afce151a..01c81f26a 100644 --- a/extras/tiger_geocoder/tiger_loader_2020.sql +++ b/extras/tiger_geocoder/tiger_loader_2020.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -165,18 +231,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -232,9 +294,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -245,8 +305,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -256,7 +315,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2021.sql b/extras/tiger_geocoder/tiger_loader_2021.sql index 0cdd7ee5a..675bff9cd 100644 --- a/extras/tiger_geocoder/tiger_loader_2021.sql +++ b/extras/tiger_geocoder/tiger_loader_2021.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -172,18 +238,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -239,9 +301,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -252,8 +312,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -263,7 +322,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2022.sql b/extras/tiger_geocoder/tiger_loader_2022.sql index af4b9ee25..991ce2255 100644 --- a/extras/tiger_geocoder/tiger_loader_2022.sql +++ b/extras/tiger_geocoder/tiger_loader_2022.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -242,9 +304,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -255,8 +315,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +325,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2023.sql b/extras/tiger_geocoder/tiger_loader_2023.sql index 691176236..65c497ce2 100644 --- a/extras/tiger_geocoder/tiger_loader_2023.sql +++ b/extras/tiger_geocoder/tiger_loader_2023.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -242,9 +304,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -255,8 +315,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +325,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2024.sql b/extras/tiger_geocoder/tiger_loader_2024.sql index 962d50f58..5e7454ffd 100644 --- a/extras/tiger_geocoder/tiger_loader_2024.sql +++ b/extras/tiger_geocoder/tiger_loader_2024.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tiger.tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tiger.tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tiger.bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,7 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; -END -$$ LANGUAGE 'plpgsql'; - -DO -$$ -BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; @@ -242,9 +297,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -255,8 +308,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +318,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +- extras/tiger_geocoder/geocode_settings.sql | 6 ++ .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 +++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2013.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2014.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2015.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2016.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2017.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2018.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2019.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2020.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2021.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2022.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2023.sql | 82 +++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2024.sql | 87 +++++++++++++++++----- 16 files changed, 794 insertions(+), 163 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Thu Feb 5 23:50:40 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 06 Feb 2026 07:50:40 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.7008adf7683de154bead5d2bac5f518a@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"50e75f9684758b1e1b9d8810395b1cbef3d18d60/git" 50e75f9/git]: {{{#!CommitTicketReference repository="git" revision="50e75f9684758b1e1b9d8810395b1cbef3d18d60" TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) - Don't create tiger_data as that gets created on first load of data and shouldn't be part of the extension References #5998 for PostGIS 3.5.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Thu Feb 5 23:56:38 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Feb 2026 23:56:38 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-75-gb83b12349 Message-ID: <20260206075638.7B7271B7E2E@trac.osgeo.org> 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, stable-3.4 has been updated via b83b12349d5098c0b8cd37c2b2ff6af9178cb07d (commit) from 766b1cd545fd22b398381180bb315ef9bb0e086a (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 b83b12349d5098c0b8cd37c2b2ff6af9178cb07d Author: Regina Obe Date: Fri Feb 6 02:55:36 2026 -0500 TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) - References #5998 for PostGIS 3.4.5 diff --git a/NEWS b/NEWS index 023a91dce..e38c14aa7 100644 --- a/NEWS +++ b/NEWS @@ -40,7 +40,8 @@ Proj 6.1+ required. - #6020, schema qualify call in ST_MPointFromText (Paul Ramsey) - #6028, crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension (Andrey Borodin, Yandex) PostGIS 3.4.4 2024/12/22 diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 12a395b60..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql index 6afce151a..01c81f26a 100644 --- a/extras/tiger_geocoder/tiger_loader_2020.sql +++ b/extras/tiger_geocoder/tiger_loader_2020.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -165,18 +231,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -232,9 +294,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -245,8 +305,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -256,7 +315,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2021.sql b/extras/tiger_geocoder/tiger_loader_2021.sql index 0cdd7ee5a..675bff9cd 100644 --- a/extras/tiger_geocoder/tiger_loader_2021.sql +++ b/extras/tiger_geocoder/tiger_loader_2021.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -172,18 +238,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -239,9 +301,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -252,8 +312,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -263,7 +322,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2022.sql b/extras/tiger_geocoder/tiger_loader_2022.sql index af4b9ee25..991ce2255 100644 --- a/extras/tiger_geocoder/tiger_loader_2022.sql +++ b/extras/tiger_geocoder/tiger_loader_2022.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -242,9 +304,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -255,8 +315,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +325,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2023.sql b/extras/tiger_geocoder/tiger_loader_2023.sql index 33de96e18..65c497ce2 100644 --- a/extras/tiger_geocoder/tiger_loader_2023.sql +++ b/extras/tiger_geocoder/tiger_loader_2023.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -242,21 +304,18 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; TRUNCATE TABLE loader_variables; INSERT INTO loader_variables(tiger_year, website_root , staging_fold, data_schema, staging_schema) - VALUES('rd22', 'https://www2.census.gov/geo/tiger/TIGER_RD18/LAYER', '/gisdata', 'tiger_data', 'tiger_staging'); + VALUES('2023', 'https://www2.census.gov/geo/tiger/TIGER2023', '/gisdata', 'tiger_data', 'tiger_staging'); GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +325,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; @@ -288,7 +346,7 @@ VALUES(10, 'tract', 'tract', true, false, true,false, 'c', '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO tract_id; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};" - ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid']); + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid', 'geoidfq']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(11, 'tabblock20', 'tabblock20', true, false, true,false, 'c', @@ -296,7 +354,7 @@ VALUES(11, 'tabblock20', 'tabblock20', true, false, true,false, 'c', '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" -${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid}'::text[]); +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, geoidfq20, uatype}'::text[]); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(12, 'bg', 'bg', false,false, true,false, 'c', @@ -304,7 +362,7 @@ VALUES(12, 'bg', 'bg', false,false, true,false, 'c', '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO bg_id; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" -${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid']); +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid', 'geoidfq']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, pre_load_process, post_load_process) VALUES(2, 'county_all', 'county', true, false, false, true, @@ -347,7 +405,7 @@ $post_load$${psql} -c "ALTER TABLE tiger.zcta5 DROP CONSTRAINT IF EXISTS enforce ${psql} -c "SELECT loader_load_staged_data(lower('${table_name}'), lower('${lookup_name}'));" ${psql} -c "INSERT INTO ${data_schema}.zcta5_all(statefp, zcta5ce, classfp, mtfcc, funcstat, aland, awater, intptlat, intptlon, partflg, the_geom) SELECT s.statefp, z.zcta5, z.classfp, z.mtfcc, z.funcstat, z.aland, z.awater, z.intptlat, z.intptlon, CASE WHEN ST_Covers(s.the_geom, z.the_geom) THEN 'N' ELSE 'Y' END, ST_SnapToGrid(ST_Transform(CASE WHEN ST_Covers(s.the_geom, z.the_geom) THEN ST_SimplifyPreserveTopology(ST_Transform(z.the_geom,2163),1000) ELSE ST_SimplifyPreserveTopology(ST_Intersection(ST_Transform(s.the_geom,2163), ST_Transform(z.the_geom,2163)),1000) END,4269), 0.000001) As geom FROM ${data_schema}.zcta5_raw AS z INNER JOIN tiger.state AS s ON (ST_Covers(s.the_geom, z.the_geom) or ST_Overlaps(s.the_geom, z.the_geom) );" ${psql} -c "DROP TABLE ${data_schema}.zcta5_raw; CREATE INDEX idx_${data_schema}_zcta5_all_the_geom_gist ON ${data_schema}.zcta5_all USING gist(the_geom);"$post_load$ -, ARRAY['gid','geoid','geoid10', 'geoid20', 'partflg']); +, ARRAY['gid','geoid','geoid10', 'geoid20', 'geoidfq20', 'partflg']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(6, 'faces', 'faces', true, true, false,false, 'c', @@ -356,13 +414,12 @@ VALUES(6, 'faces', 'faces', true, true, false,false, 'c', ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tfid ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree (tfid);" ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_countyfp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (countyfp);" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" - ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid', 'geoid','cpi','suffix1ce', 'statefp00', 'statefp10', 'countyfp00','countyfp10' + ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid', 'geoid','geoidfq', 'cpi','suffix1ce', 'statefp00', 'statefp10', 'countyfp00','countyfp10' ,'tractce00','tractce10', 'blkgrpce00', 'blkgrpce10', 'blockce00', 'blockce10' , 'cousubfp00', 'submcdfp00', 'conctyfp00', 'placefp00', 'aiannhfp00', 'aiannhce00', 'comptyp00', 'trsubfp00', 'trsubce00', 'anrcfp00', 'elsdlea00', 'scsdlea00', 'unsdlea00', 'uace00', 'cd108fp', 'sldust00', 'sldlst00', 'vtdst00', 'zcta5ce00', - 'tazce00', 'ugace00', 'puma5ce00','vtdst10','tazce10','uace10','puma5ce10','tazce', 'uace', 'vtdst', 'zcta5ce10', 'puma5ce', 'ugace10','pumace10', 'estatefp', 'ugace', 'blockce', 'pumace20', 'sdadmlea', 'uace20']); - + 'tazce00', 'ugace00', 'puma5ce00','vtdst10','tazce10','uace10','puma5ce10','tazce', 'uace', 'vtdst', 'zcta5ce10', 'puma5ce', 'ugace10','pumace10', 'estatefp', 'ugace', 'blockce', 'pumace20', 'sdadmlea', 'uace20', 'cnectafp', 'nctadvfp','nectafp']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(7, 'featnames', 'featnames', true, true, false,false, 'a', '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(tiger.${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${table_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ', @@ -370,7 +427,7 @@ VALUES(7, 'featnames', 'featnames', true, true, false,false, 'a', ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname ON ${data_schema}.${state_abbrev}_${table_name} USING btree (lower(name));" ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" -${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']); +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp', 'geoidfq']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(8, 'edges', 'edges', true, true, false,false, 'a', @@ -391,7 +448,7 @@ ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_zip_state_loc;" ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAINT pk_${state_abbrev}_zip_state_loc_city PRIMARY KEY(zip,state, county, city, statefp)) INHERITS(tiger.zip_lookup_base);" ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}'' FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" -${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));"', ARRAY['gid', 'geoid','divroad'] ); +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));"', ARRAY['gid', 'geoid', 'geoidfq', 'divroad'] ); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude ) VALUES(9, 'addr', 'addr', true, true, false,false, 'a', @@ -403,7 +460,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a', ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_state(CONSTRAINT pk_${state_abbrev}_zip_state PRIMARY KEY(zip,stusps)) INHERITS(tiger.zip_state); " ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" - ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp','fromarmid', 'toarmid']); + ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','geoidfq', 'statefp','fromarmid', 'toarmid']); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude ) VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a', @@ -548,12 +605,12 @@ RETURNS integer AS $$ -- exclude this set list of columns if no exclusion list is specified - SELECT loader_load_staged_data($1, $2,(SELECT COALESCE(columns_exclude,ARRAY['gid', 'geoid','cpi','suffix1ce', 'statefp00', 'statefp10', 'countyfp00','countyfp10' + SELECT tiger.loader_load_staged_data($1, $2,(SELECT COALESCE(columns_exclude,ARRAY['gid', 'geoid', 'geoidfq20', 'cpi','suffix1ce', 'statefp00', 'statefp10', 'countyfp00','countyfp10' ,'tractce00','tractce10', 'blkgrpce00', 'blkgrpce10', 'blockce00', 'blockce10' - , 'cousubfp00', 'submcdfp00', 'conctyfp00', 'placefp00', 'aiannhfp00', 'aiannhce00', - 'comptyp00', 'trsubfp00', 'trsubce00', 'anrcfp00', 'elsdlea00', 'scsdlea00', + , 'cousubfp00', 'submcdfp00', 'conctyfp00', 'placefp00', 'aiannhfp00', 'aiannhce00' + , 'comptyp00', 'trsubfp00', 'trsubce00', 'anrcfp00', 'elsdlea00', 'scsdlea00', 'unsdlea00', 'uace00', 'cd108fp', 'sldust00', 'sldlst00', 'vtdst00', 'zcta5ce00', - 'tazce00', 'ugace00', 'puma5ce00','vtdst10','tazce10','uace10','puma5ce10','tazce', 'uace', 'vtdst', 'zcta5ce', 'zcta5ce10', 'puma5ce', 'ugace10','pumace10', 'estatefp', 'ugace', 'blockce']) FROM loader_lookuptables WHERE $2 LIKE '%' || lookup_name)) + 'tazce00', 'ugace00', 'puma5ce00','vtdst10','tazce10','uace10','puma5ce10','tazce', 'uace', 'vtdst', 'zcta5ce', 'zcta5ce10', 'puma5ce', 'ugace10','pumace10', 'estatefp', 'ugace', 'blockce', 'cnectafp', 'geoidfq', 'nctadvfp', 'nectafp','pcinecta' ]) FROM loader_lookuptables WHERE $2 LIKE '%' || lookup_name)) $$ language 'sql' VOLATILE; ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +- .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 ++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 +-- extras/tiger_geocoder/tiger_loader_2013.sql | 16 +-- extras/tiger_geocoder/tiger_loader_2014.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2015.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2016.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2017.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2018.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2019.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2020.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2021.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2022.sql | 82 ++++++++++++--- extras/tiger_geocoder/tiger_loader_2023.sql | 111 ++++++++++++++++----- 14 files changed, 733 insertions(+), 160 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Thu Feb 5 23:56:40 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 06 Feb 2026 07:56:40 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.d3183de3b2b35fa886d6899a621b7bea@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"b83b12349d5098c0b8cd37c2b2ff6af9178cb07d/git" b83b123/git]: {{{#!CommitTicketReference repository="git" revision="b83b12349d5098c0b8cd37c2b2ff6af9178cb07d" TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) - References #5998 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 6 00:07:57 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 00:07:57 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.7-71-ge20d4da2f Message-ID: <20260206080757.DFA801B7E3B@trac.osgeo.org> 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, stable-3.3 has been updated via e20d4da2f119e193c195afe7087d14772b969b29 (commit) from 05ba89e6e2a9cc3761ea8b21773a6d9fbc9acdd9 (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 e20d4da2f119e193c195afe7087d14772b969b29 Author: Regina Obe Date: Fri Feb 6 03:05:02 2026 -0500 TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.3.9 diff --git a/NEWS b/NEWS index b23c7db50..b8e5e4ae8 100644 --- a/NEWS +++ b/NEWS @@ -29,7 +29,10 @@ Proj 4.9+ required. - #6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) - #6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) - #6028, crash indexing malformed empty polygon (Paul Ramsey) - - GH-841, small memory leak in address_standardizer (Maxim Korotkov) + - GH-841, small memory leak in address_standardizer (Maxim Korotkov) + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required + by extension are owned by extension + authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) PostGIS 3.3.8 diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 12a395b60..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql index 6afce151a..01c81f26a 100644 --- a/extras/tiger_geocoder/tiger_loader_2020.sql +++ b/extras/tiger_geocoder/tiger_loader_2020.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -165,18 +231,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -232,9 +294,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -245,8 +305,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -256,7 +315,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2021.sql b/extras/tiger_geocoder/tiger_loader_2021.sql index 0cdd7ee5a..675bff9cd 100644 --- a/extras/tiger_geocoder/tiger_loader_2021.sql +++ b/extras/tiger_geocoder/tiger_loader_2021.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -172,18 +238,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -239,9 +301,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -252,8 +312,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -263,7 +322,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2022.sql b/extras/tiger_geocoder/tiger_loader_2022.sql index af4b9ee25..991ce2255 100644 --- a/extras/tiger_geocoder/tiger_loader_2022.sql +++ b/extras/tiger_geocoder/tiger_loader_2022.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -175,18 +241,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -242,9 +304,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -255,8 +315,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -266,7 +325,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +- .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 +++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 ++--- extras/tiger_geocoder/tiger_loader_2013.sql | 16 ++--- extras/tiger_geocoder/tiger_loader_2014.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2015.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2016.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2017.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2018.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2019.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2020.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2021.sql | 82 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2022.sql | 82 ++++++++++++++++++---- 13 files changed, 651 insertions(+), 133 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 6 00:07:59 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 06 Feb 2026 08:07:59 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.750ba1a7c1e9f1f2c18914743a08e698@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"e20d4da2f119e193c195afe7087d14772b969b29/git" e20d4da/git]: {{{#!CommitTicketReference repository="git" revision="e20d4da2f119e193c195afe7087d14772b969b29" TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) References #5998 for PostGIS 3.3.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 6 00:11:25 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 00:11:25 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.7-62-gd19a022df Message-ID: <20260206081125.A9458203F7@trac.osgeo.org> 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, stable-3.2 has been updated via d19a022dfbf9f32ef8095b19dc4036892ecc3683 (commit) from 1eee9c10d84fcddbe737692f34fa1ab80dc84771 (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 d19a022dfbf9f32ef8095b19dc4036892ecc3683 Author: Regina Obe Date: Fri Feb 6 03:10:41 2026 -0500 TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) Closes #5998 for PostGIS 3.2.9 diff --git a/NEWS b/NEWS index 8b5dbf815..e1b54c1e7 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,9 @@ Proj 4.9+ required. - #5989, CurvePolygon distance error (Paul Ramsey) - #6028, Crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - + - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required + by extension are owned by extension + authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) PostGIS 3.2.8 2024/12/22 diff --git a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql index ff78fc8f8..da6fc91a9 100644 --- a/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql +++ b/extras/tiger_geocoder/pagc_normalize/pagc_tables.sql @@ -11,14 +11,23 @@ BEGIN IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz') THEN CREATE TABLE pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_gaz TO public; + ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS pagc_gaz (id serial NOT NULL primary key ,seq integer ,word text, stdword text, token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_lex') THEN CREATE TABLE pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); GRANT SELECT ON pagc_lex TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_lex (id serial NOT NULL primary key,seq integer,word text,stdword text,token integer,is_custom boolean NOT NULL default true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_rules') THEN CREATE TABLE pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); GRANT SELECT ON pagc_rules TO public; + ELSE + -- Same as above. + CREATE TABLE IF NOT EXISTS pagc_rules (id serial NOT NULL primary key,rule text, is_custom boolean DEFAULT true); END IF; IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'pagc_gaz' AND data_type='text') THEN -- its probably old table structure change type of lex and gaz columns diff --git a/extras/tiger_geocoder/tiger_loader_2012.sql b/extras/tiger_geocoder/tiger_loader_2012.sql index c4d6da1b7..00593ecf5 100644 --- a/extras/tiger_geocoder/tiger_loader_2012.sql +++ b/extras/tiger_geocoder/tiger_loader_2012.sql @@ -57,18 +57,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -125,9 +121,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -138,8 +132,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -149,7 +142,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2013.sql b/extras/tiger_geocoder/tiger_loader_2013.sql index d42f60ea2..8b6e0d166 100644 --- a/extras/tiger_geocoder/tiger_loader_2013.sql +++ b/extras/tiger_geocoder/tiger_loader_2013.sql @@ -56,18 +56,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -124,9 +120,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -137,8 +131,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -148,7 +141,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2014.sql b/extras/tiger_geocoder/tiger_loader_2014.sql index bedb84051..8726e5afe 100644 --- a/extras/tiger_geocoder/tiger_loader_2014.sql +++ b/extras/tiger_geocoder/tiger_loader_2014.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2015.sql b/extras/tiger_geocoder/tiger_loader_2015.sql index fe0bdf62f..3311be2e7 100644 --- a/extras/tiger_geocoder/tiger_loader_2015.sql +++ b/extras/tiger_geocoder/tiger_loader_2015.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -212,9 +274,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -225,8 +285,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -236,7 +295,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2016.sql b/extras/tiger_geocoder/tiger_loader_2016.sql index 0cb93e442..39dd37f0a 100644 --- a/extras/tiger_geocoder/tiger_loader_2016.sql +++ b/extras/tiger_geocoder/tiger_loader_2016.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2017.sql b/extras/tiger_geocoder/tiger_loader_2017.sql index 9a7c6a726..5644a4d53 100644 --- a/extras/tiger_geocoder/tiger_loader_2017.sql +++ b/extras/tiger_geocoder/tiger_loader_2017.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2018.sql b/extras/tiger_geocoder/tiger_loader_2018.sql index 61e68797a..33697e785 100644 --- a/extras/tiger_geocoder/tiger_loader_2018.sql +++ b/extras/tiger_geocoder/tiger_loader_2018.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2019.sql b/extras/tiger_geocoder/tiger_loader_2019.sql index 12a395b60..9485011cf 100644 --- a/extras/tiger_geocoder/tiger_loader_2019.sql +++ b/extras/tiger_geocoder/tiger_loader_2019.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -144,18 +210,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -211,9 +273,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -224,8 +284,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -235,7 +294,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; diff --git a/extras/tiger_geocoder/tiger_loader_2020.sql b/extras/tiger_geocoder/tiger_loader_2020.sql index 2343fe15c..01c81f26a 100644 --- a/extras/tiger_geocoder/tiger_loader_2020.sql +++ b/extras/tiger_geocoder/tiger_loader_2020.sql @@ -2,7 +2,7 @@ -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.net -- --- Copyright (C) 2012-2021 Regina Obe and Leo Hsu +-- Copyright (C) 2012-2018 Regina Obe and Leo Hsu -- Paragon Corporation -- -- This is free software; you can redistribute and/or modify it under @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -165,18 +231,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -232,9 +294,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -245,8 +305,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -256,7 +315,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; @@ -275,8 +333,9 @@ COMMENT ON COLUMN loader_lookuptables.website_root_override IS 'Path to use for INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) VALUES(10, 'tract', 'tract', true, false, true,false, 'c', '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tract_id) ) INHERITS(tiger.${lookup_name}); " ', - '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO tract_id;" - ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid IF EXISTS TO tract_id; + ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 IF EXISTS TO tract_id; + SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};" ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid']); @@ -291,7 +350,7 @@ ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_ ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]); INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) -VALUES(11, 'tabblock20', 'tabblock20', false, false, true,false, 'c', +VALUES(11, 'tabblock20', 'tabblock20', true, false, true,false, 'c', '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (geoid)) INHERITS(tiger.${lookup_name});" ', '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" diff --git a/extras/tiger_geocoder/tiger_loader_2021.sql b/extras/tiger_geocoder/tiger_loader_2021.sql index 0cdd7ee5a..675bff9cd 100644 --- a/extras/tiger_geocoder/tiger_loader_2021.sql +++ b/extras/tiger_geocoder/tiger_loader_2021.sql @@ -89,6 +89,72 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) ); COMMENT ON TABLE tiger.bg IS 'block groups'; +ELSE + -- Insist on invoking Postgres logic of owning table by extension. This prevent attacks like CVE-2022-2625. + CREATE TABLE IF NOT EXISTS tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(16) PRIMARY KEY, + name varchar(20), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + + CREATE TABLE IF NOT EXISTS bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); END IF; IF EXISTS(SELECT * FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tabblock_id' AND table_name = 'tabblock' AND character_maximum_length < 16) THEN -- size of name and tabblock_id fields need to be increased @@ -172,18 +238,14 @@ $$ DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_platform' AND table_schema = 'tiger') THEN - CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); - END IF; + CREATE TABLE IF NOT EXISTS loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); END $$ LANGUAGE 'plpgsql'; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.schemata WHERE schema_name = 'tiger_data') THEN - CREATE SCHEMA tiger_data; - END IF; + CREATE SCHEMA IF NOT EXISTS tiger_data; END $$ LANGUAGE 'plpgsql'; @@ -239,9 +301,7 @@ done'); -- variables table DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_variables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); - END IF; + CREATE TABLE IF NOT EXISTS loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); END $$ LANGUAGE 'plpgsql'; @@ -252,8 +312,7 @@ GRANT SELECT ON TABLE loader_variables TO public; DO $$ BEGIN - IF NOT EXISTS (SELECT * FROM information_schema.tables WHERE table_name = 'loader_lookuptables' AND table_schema = 'tiger') THEN - CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + CREATE TABLE IF NOT EXISTS loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, lookup_name text primary key, table_name text, single_mode boolean NOT NULL DEFAULT true, load boolean NOT NULL DEFAULT true, @@ -263,7 +322,6 @@ BEGIN post_load_process text, single_geom_mode boolean DEFAULT false, insert_mode char(1) NOT NULL DEFAULT 'c', pre_load_process text,columns_exclude text[], website_root_override text); - END IF; END $$ LANGUAGE 'plpgsql'; ----------------------------------------------------------------------- Summary of changes: NEWS | 4 +- .../tiger_geocoder/pagc_normalize/pagc_tables.sql | 9 +++ extras/tiger_geocoder/tiger_loader_2012.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2013.sql | 16 +--- extras/tiger_geocoder/tiger_loader_2014.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2015.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2016.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2017.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2018.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2019.sql | 82 ++++++++++++++++--- extras/tiger_geocoder/tiger_loader_2020.sql | 91 ++++++++++++++++++---- extras/tiger_geocoder/tiger_loader_2021.sql | 82 ++++++++++++++++--- 12 files changed, 585 insertions(+), 125 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 6 00:11:27 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 06 Feb 2026 08:11:27 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.56f32b7e4288a5d29fb11007577eff26@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: fixed | Keywords: -----------------------------+---------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: reopened => closed Comment: In [changeset:"d19a022dfbf9f32ef8095b19dc4036892ecc3683/git" d19a022/git]: {{{#!CommitTicketReference repository="git" revision="d19a022dfbf9f32ef8095b19dc4036892ecc3683" TIGER EXTENSION SECURITY fix - Ensure tables are created by tiger extension and bale if not. Patch provided by Andrey Borodin (Yandex) Closes #5998 for PostGIS 3.2.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 6 00:20:54 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 00:20:54 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.11-24-g052639cef Message-ID: <20260206082055.1CD62208A2@trac.osgeo.org> 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, stable-3.0 has been updated via 052639cefc52370d6271ee72e24a4c012600d960 (commit) from 89467dc26d9e4d9bfc7d6d47372970997696e194 (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 052639cefc52370d6271ee72e24a4c012600d960 Author: Regina Obe Date: Fri Feb 6 03:20:48 2026 -0500 Prep for release of PostGIS 3.0.12 EOL diff --git a/NEWS b/NEWS index d2daeb585..eaa40f93d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ PostGIS 3.0.12 (EOL) -2026/02/xx +2026/02/06 PostgreSQL 9.5-13 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. diff --git a/README.postgis b/README.postgis index 9afc2825a..47e617674 100644 --- a/README.postgis +++ b/README.postgis @@ -2,7 +2,7 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= :Version: 3.0.12 -:Date: xxxx-xx-xx +:Date: 2026-02-06 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 90dfeac7c..62e5dcc4d 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=0 -POSTGIS_MICRO_VERSION=12dev +POSTGIS_MICRO_VERSION=12 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 0427718be..1d1bcd507 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,6 +2,26 @@ Appendix Release Notes + + Release 3.0.11 (EOL) + Release date: 2026/02/06 + This is a bug and security release and the final release of 3.0 series. This version requires PostgreSQL 9.5+-13 and GEOS >= 3.6+ + Additional features and enhancements enabled if you are running Proj6+, PostgreSQL 12+, and GEOS 3.8 + + Bug Fixes + 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) + 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) + 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) + 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) + 5795, [topology] Fix ST_NewEdgesSplit can cause invalid topology (Bj?rn Harrtell) + Handle null returns from wkb parser, Paul Ramsey + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 6028, Crash indexing malformed empty polygon (Paul Ramsey) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension + + + Release 3.0.11 Release date: 2024/02/06 diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 0c092365a..33703e968 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -68,4 +68,5 @@ UPGRADEABLE_VERSIONS = \ 3.0.7 \ 3.0.8 \ 3.0.9 \ - 3.0.10 + 3.0.10 \ + 3.0.11 ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- README.postgis | 2 +- Version.config | 2 +- doc/release_notes.xml | 20 ++++++++++++++++++++ extensions/upgradeable_versions.mk | 3 ++- 5 files changed, 25 insertions(+), 4 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Fri Feb 6 00:27:02 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 00:27:02 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.1 updated. 3.1.11-48-gd80f7b65d Message-ID: <20260206082702.4FDBC1B78D0@trac.osgeo.org> 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, stable-3.1 has been updated via d80f7b65dbb9a5f3283badd9de9dfee8470aa866 (commit) from 0051d330b2697d1218db44ad4d5c26c9c9aff3a2 (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 d80f7b65dbb9a5f3283badd9de9dfee8470aa866 Author: Regina Obe Date: Fri Feb 6 03:26:56 2026 -0500 Prep for PostGIS 3.1.13 EOL release diff --git a/NEWS b/NEWS index da155622d..115a8900e 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.1.13dev -YYYY/MM/DD +PostGIS 3.1.13 (EOL) +2026/02/06 * Bug Fixes * diff --git a/README.postgis b/README.postgis index e4b166c25..c541bc8cb 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 3.1.12 -:Date: 2024-12-23 +:Version: 3.1.13 +:Date: 2026-02-06 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 9ab5137b7..ed3742255 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=1 -POSTGIS_MICRO_VERSION=13dev +POSTGIS_MICRO_VERSION=13 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index ecb1466fc..7ea5828df 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,6 +2,32 @@ Appendix Release Notes + + Release 3.1.13 (EOL) + This release works with PostgreSQL 9.6-14. + + Bug Fixes + Release date: 2026/02/06 + 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) + 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) + 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) + 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) + 5876, Fix ST_AddPoint with empty point argument (Paul Ramsey) + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 5885, Fix documentation about grid-based overlay operations (Sandro Santilli) + PCRE2 support for more modern systems (Paul Ramsey) + 5921, Crash freeing uninitialized pointer (Arsenii Mukhin) + 5912, Crash on GML with xlink and no prefix (Paul Ramsey) + 5905, Crash on deeply nested geometries (Paul Ramsey) + 5909, ST_ValueCount crashes on empty table (Paul Ramsey) + 5917, ST_Relate becomes unresponsive (Paul Ramsey) + 5991, CircularString distance error (Paul Ramsey) + 5962, Consistent clipping of MULTI/POINT (Paul Ramsey) + 6028, Crash indexing malformed empty polygon (Paul Ramsey) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension + + Release 3.1.12 This release works with PostgreSQL 9.6-14. ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++-- README.postgis | 4 ++-- Version.config | 2 +- doc/release_notes.xml | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Fri Feb 6 00:32:21 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 00:32:21 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.11-25-ga453045ac Message-ID: <20260206083221.4C593209AC@trac.osgeo.org> 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, stable-3.0 has been updated via a453045ac20612abfddf5166322dea2f9c94e3bd (commit) from 052639cefc52370d6271ee72e24a4c012600d960 (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 a453045ac20612abfddf5166322dea2f9c94e3bd Author: Regina Obe Date: Fri Feb 6 03:32:15 2026 -0500 Take out testing of pg95 and pg96, these images are no longer available diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a51a5338..64e70546b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: # - { tag: latest, mode: tests } - { tag: pg11-geos37-gdal24-proj52, mode: tests } - { tag: pg10-geos36-gdal23-proj49, mode: tests } - - { tag: pg96-geos36-gdal22-proj49, mode: tests } - - { tag: pg95-geos36-gdal21-proj48, mode: tests } + #- { tag: pg96-geos36-gdal22-proj49, mode: tests } + #- { tag: pg95-geos36-gdal21-proj48, mode: tests } runs-on: ubuntu-latest steps: ----------------------------------------------------------------------- Summary of changes: .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Fri Feb 6 08:43:19 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 08:43:19 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-330-g5fac7d16a Message-ID: <20260206164319.963603EA3C@trac.osgeo.org> 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 5fac7d16ab444240d465a36d717b4f0b95c068dd (commit) from cbc0c3ae7bc093ede5451d64f00486b4d02f0c08 (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 5fac7d16ab444240d465a36d717b4f0b95c068dd Author: Paul Ramsey Date: Fri Feb 6 08:41:18 2026 -0800 Add ST_ClusterRelateWin, a souped up version of ST_ClusterIntersectingWin, that allows any DE9IM matrix to be used as the clustering condition. So only things that touch get added to the cluster, or only things with very specific kinds of overlap. (OK, probably 90% of usage will be things like touch, or ends-only-join for lines.) diff --git a/doc/html/images/Makefile.in b/doc/html/images/Makefile.in index cb01b2d60..203142611 100644 --- a/doc/html/images/Makefile.in +++ b/doc/html/images/Makefile.in @@ -80,6 +80,7 @@ GENERATED_IMAGES= \ st_closestpoint01.png \ st_closestpoint02.png \ st_clusterkmeans02.png \ + st_clusterrelatewin01.png \ st_centroid01.png \ st_centroid02.png \ st_centroid03.png \ diff --git a/doc/html/images/wkt/st_clusterrelatewin01.wkt b/doc/html/images/wkt/st_clusterrelatewin01.wkt new file mode 100644 index 000000000..a5964ed0b --- /dev/null +++ b/doc/html/images/wkt/st_clusterrelatewin01.wkt @@ -0,0 +1,6 @@ +ArgA;LINESTRING(2 2,50 50) +ArgA;LINESTRING(98 98,50 50) +ArgA;LINESTRING(2 50,50 2) +ArgA;LINESTRING(2 50,2 194) +ArgA;LINESTRING(98 98,98 194) +ArgA;LINESTRING(74 122,122 170) diff --git a/doc/reference_cluster.xml b/doc/reference_cluster.xml index 5b2a35a65..dfe7e90eb 100644 --- a/doc/reference_cluster.xml +++ b/doc/reference_cluster.xml @@ -281,6 +281,89 @@ FROM testdata; + + + + ST_ClusterRelateWin + + Window function that returns a cluster id for each input geometry, clustering input geometries into connected sets using the relate pattern to determine whether the geometries are connected. + + + + + + integer ST_ClusterRelateWin + geometry winset geom + text relate_matrix + + + + + + Description + + A window function that builds connected clusters of geometries that intersect. Geometries are added to a cluster if they share a pairwise DE9IM relationship with another member of the cluster. With this function it is possible to build a cluster of all objects that touch at boundaries, but exclude those that merely overlap. + + Availability: 3.7.0 + + + + Examples + This collection of line strings would form a single cluster using , but using can be clustered into three groups that connect only via their end points. + + + + + + + + Connected and overlapping linestrings + + + + + +CREATE TABLE clusterrelate ( + id serial, + geom geometry); + +INSERT INTO clusterrelate (geom) + VALUES + ('LINESTRING(0 0,1 1)'), + ('LINESTRING(2 2,1 1)'), + ('LINESTRING(0 1,1 0)'), + ('LINESTRING(0 1,0 4)'), + ('LINESTRING(2 2,2 4)'), + ('LINESTRING(1.5 2.5,2.5 3.5)'); + +SELECT id, + ST_AsText(geom), + ST_ClusterRelateWin(geom, '****0****') OVER () AS cluster +FROM clusterrelate; + + id | st_astext | cluster +----+-----------------------------+--------- + 1 | LINESTRING(0 0,1 1) | 0 + 2 | LINESTRING(2 2,1 1) | 0 + 3 | LINESTRING(0 1,1 0) | 1 + 4 | LINESTRING(0 1,0 4) | 1 + 5 | LINESTRING(2 2,2 4) | 0 + 6 | LINESTRING(1.5 2.5,2.5 3.5) | 2 + + + + See Also + + , + , + + + + + + + + ST_ClusterKMeans diff --git a/liblwgeom/lwgeom_geos.h b/liblwgeom/lwgeom_geos.h index 84638d82b..2d80819fb 100644 --- a/liblwgeom/lwgeom_geos.h +++ b/liblwgeom/lwgeom_geos.h @@ -44,6 +44,7 @@ GEOSGeometry* make_geos_segment(double x1, double y1, double x2, double y2); int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry ***clusterGeoms, uint32_t *num_clusters); int union_intersecting_pairs(GEOSGeometry** geoms, uint32_t num_geoms, UNIONFIND* uf); +int union_related_pairs(GEOSGeometry** geoms, uint32_t num_geoms, const char* im, UNIONFIND* uf); int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters); int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret); diff --git a/liblwgeom/lwgeom_geos_cluster.c b/liblwgeom/lwgeom_geos_cluster.c index c0e8b2f91..318d3558e 100644 --- a/liblwgeom/lwgeom_geos_cluster.c +++ b/liblwgeom/lwgeom_geos_cluster.c @@ -239,6 +239,100 @@ union_intersecting_pairs(GEOSGeometry** geoms, uint32_t num_geoms, UNIONFIND* uf return success; } + + +/* + * Identify geometries that match the relate pattern + * and mark them as being in the same set + */ +int +union_related_pairs( + GEOSGeometry** geoms, + uint32_t num_geoms, + const char* matrix, + UNIONFIND* uf) +{ +#if POSTGIS_GEOS_VERSION >= 31300 + int success = LW_SUCCESS; + uint32_t p, i; + struct STRTree tree; + struct QueryContext cxt = + { + .items_found = NULL, + .num_items_found = 0, + .items_found_size = 0 + }; + + if (num_geoms <= 1) + return LW_SUCCESS; + + tree = make_strtree((void**) geoms, num_geoms, LW_FALSE); + if (tree.tree == NULL) + { + destroy_strtree(&tree); + return LW_FAILURE; + } + + for (p = 0; p < num_geoms; p++) + { + const GEOSPreparedGeometry* prep = NULL; + + if (!geoms[p] || GEOSisEmpty(geoms[p])) + continue; + + cxt.num_items_found = 0; + GEOSSTRtree_query(tree.tree, geoms[p], &query_accumulate, &cxt); + + /* + * II BI EI + * IB BB EB + * IE BE EE + */ + for (i = 0; i < cxt.num_items_found; i++) + { + uint32_t q = *((uint32_t*) cxt.items_found[i]); + + if (p != q && UF_find(uf, p) != UF_find(uf, q)) + { + int geos_result; + + if (prep == NULL) + { + prep = GEOSPrepare(geoms[p]); + } + geos_result = GEOSPreparedRelatePattern(prep, geoms[q], matrix); + + if (geos_result > 1) + { + success = LW_FAILURE; + break; + } + else if (geos_result) + { + UF_union(uf, p, q); + } + } + } + + if (prep) + GEOSPreparedGeom_destroy(prep); + + if (!success) + break; + } + + if (cxt.items_found) + lwfree(cxt.items_found); + + destroy_strtree(&tree); + return success; + +#else /* POSTGIS_GEOS_VERSION >= 31300 */ + return LW_FAILURE; +#endif +} + + /** Takes an array of GEOSGeometry* and constructs an array of GEOSGeometry*, where each element in the constructed * array is a GeometryCollection representing a set of interconnected geometries. Caller is responsible for * freeing the input array, but not for destroying the GEOSGeometry* items inside it. */ diff --git a/liblwgeom/lwunionfind.h b/liblwgeom/lwunionfind.h index 34b2efd0e..75e0ae788 100644 --- a/liblwgeom/lwunionfind.h +++ b/liblwgeom/lwunionfind.h @@ -22,9 +22,7 @@ * **********************************************************************/ - -#ifndef _LWUNIONFIND -#define _LWUNIONFIND 1 +#pragma once #include "liblwgeom.h" @@ -61,4 +59,3 @@ uint32_t* UF_ordered_by_cluster(UNIONFIND* uf); * */ uint32_t* UF_get_collapsed_cluster_ids(UNIONFIND* uf, const char* is_in_cluster); -#endif diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index 339214f0d..e4aacfcfe 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -2031,7 +2031,8 @@ Datum clusterintersecting_garray(PG_FUNCTION_ARGS) ArrayType *array, *result; int is3d = 0; uint32 nelems, nclusters, i; - GEOSGeometry **geos_inputs, **geos_results; + GEOSGeometry **geos_inputs; + GEOSGeometry **geos_results; int32_t srid = SRID_UNKNOWN; /* Parameters used to construct a result array */ diff --git a/postgis/lwgeom_transform.c b/postgis/lwgeom_transform.c index 58bbac8d6..4a23fe3fc 100644 --- a/postgis/lwgeom_transform.c +++ b/postgis/lwgeom_transform.c @@ -509,6 +509,7 @@ srs_find_planar(const char *auth_name, const LWGEOM *bounds, struct srs_data *st while (crs_list && *crs_list) { + uint32_t num_entries = state->num_entries; /* Read current crs and move forward one entry */ PROJ_CRS_INFO *crs = *crs_list++; @@ -524,10 +525,10 @@ srs_find_planar(const char *auth_name, const LWGEOM *bounds, struct srs_data *st srs_state_memcheck(state); /* Write the entry into the entry list and increment */ - state->entries[state->num_entries].auth_name = cstring_to_text(crs->auth_name); - state->entries[state->num_entries].auth_code = cstring_to_text(crs->code); - state->entries[state->num_entries].sort = area; - state->num_entries++; + state->entries[num_entries].auth_name = cstring_to_text(crs->auth_name); + state->entries[num_entries].auth_code = cstring_to_text(crs->code); + state->entries[num_entries].sort = area; + state->num_entries = num_entries + 1; } /* Put the list of entries into order of area size, smallest to largest */ diff --git a/postgis/lwgeom_window.c b/postgis/lwgeom_window.c index 90af7a867..4e931af53 100644 --- a/postgis/lwgeom_window.c +++ b/postgis/lwgeom_window.c @@ -350,6 +350,90 @@ Datum ST_ClusterIntersectingWin(PG_FUNCTION_ARGS) } +extern Datum ST_ClusterRelateWin(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_ClusterRelateWin); +Datum ST_ClusterRelateWin(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 31300 + lwpgerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_ClusterRelateWin' function (3.13.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else + + WindowObject win_obj = PG_WINDOW_OBJECT(); + uint32_t row = WinGetCurrentPosition(win_obj); + uint32_t ngeoms = WinGetPartitionRowCount(win_obj); + cluster_context* context = fetch_cluster_context(win_obj, ngeoms); + + if (row == 0) /* beginning of the partition; do all of the work now */ + { + bool matrix_is_null = false; + uint32_t i; + uint32_t* result_ids; + GEOSGeometry** geoms = palloc0(ngeoms * sizeof(GEOSGeometry*)); + UNIONFIND* uf = UF_create(ngeoms); + char *matrix; + text *txtIm = DatumGetTextP(WinGetFuncArgCurrent(win_obj, 1, &matrix_is_null)); + if (matrix_is_null || VARSIZE_ANY_EXHDR(txtIm) != 9) + { + elog(ERROR,"Invalid relate matrix provided"); + PG_RETURN_NULL(); + } + matrix = text_to_cstring(txtIm); + + context->is_error = LW_TRUE; /* until proven otherwise */ + initGEOS(lwpgnotice, lwgeom_geos_error); + + for (i = 0; i < ngeoms; i++) + { + bool geom_is_null; + geoms[i] = read_geos_from_partition(win_obj, i, &geom_is_null); + context->clusters[i].is_null = geom_is_null; + + if (!geoms[i]) + { + elog(ERROR, "Error reading geometry"); + PG_RETURN_NULL(); + } + } + + if (union_related_pairs(geoms, ngeoms, matrix, uf) == LW_SUCCESS) + context->is_error = LW_FALSE; + + for (i = 0; i < ngeoms; i++) + { + GEOSGeom_destroy(geoms[i]); + } + pfree(geoms); + pfree(matrix); + + if (context->is_error) + { + UF_destroy(uf); + elog(ERROR, "Error during clustering"); + PG_RETURN_NULL(); + } + + result_ids = UF_get_collapsed_cluster_ids(uf, NULL); + for (i = 0; i < ngeoms; i++) + { + context->clusters[i].cluster_id = result_ids[i]; + } + + pfree(result_ids); + UF_destroy(uf); + } + + if (context->clusters[row].is_null) + PG_RETURN_NULL(); + + PG_RETURN_INT32(context->clusters[row].cluster_id); +#endif +} + + extern Datum ST_ClusterKMeans(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(ST_ClusterKMeans); Datum ST_ClusterKMeans(PG_FUNCTION_ARGS) diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in index 4d13ced28..118a6499e 100644 --- a/postgis/postgis.sql.in +++ b/postgis/postgis.sql.in @@ -1941,6 +1941,13 @@ CREATE OR REPLACE FUNCTION ST_ClusterIntersectingWin(geometry) LANGUAGE 'c' IMMUTABLE STRICT WINDOW PARALLEL SAFE _COST_HIGH; +-- Availability: 3.7.0 +CREATE OR REPLACE FUNCTION ST_ClusterRelateWin(geom geometry, relate_matrix text) + RETURNS int + AS 'MODULE_PATHNAME', 'ST_ClusterRelateWin' + LANGUAGE 'c' IMMUTABLE STRICT WINDOW PARALLEL SAFE + _COST_HIGH; + -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LineMerge(geometry) RETURNS geometry ----------------------------------------------------------------------- Summary of changes: doc/html/images/Makefile.in | 1 + doc/html/images/wkt/st_clusterrelatewin01.wkt | 6 ++ doc/reference_cluster.xml | 83 +++++++++++++++++++++++ liblwgeom/lwgeom_geos.h | 1 + liblwgeom/lwgeom_geos_cluster.c | 94 +++++++++++++++++++++++++++ liblwgeom/lwunionfind.h | 5 +- postgis/lwgeom_geos.c | 3 +- postgis/lwgeom_transform.c | 9 +-- postgis/lwgeom_window.c | 84 ++++++++++++++++++++++++ postgis/postgis.sql.in | 7 ++ 10 files changed, 284 insertions(+), 9 deletions(-) create mode 100644 doc/html/images/wkt/st_clusterrelatewin01.wkt hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 6 21:41:58 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 05:41:58 -0000 Subject: [PostGIS] #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches In-Reply-To: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> References: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> Message-ID: <061.9289011974b149517de49ebbf092945f@osgeo.org> #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches ----------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Resolution: | Keywords: ----------------------+---------------------------- Changes (by robe): * milestone: PostGIS 3.3.9 => PostGIS 3.0.12 * resolution: fixed => * status: closed => reopened -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 6 21:45:30 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 21:45:30 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.11-27-g39428a2cf Message-ID: <20260207054531.0A8B61125C8@trac.osgeo.org> 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, stable-3.0 has been updated via 39428a2cf7c596821d9a9887197a55f0e7b55d71 (commit) via 93f63a9bd7b75a41712d9473cb7ce18ca721faa3 (commit) from a453045ac20612abfddf5166322dea2f9c94e3bd (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 39428a2cf7c596821d9a9887197a55f0e7b55d71 Author: Regina Obe Date: Sat Feb 7 00:44:50 2026 -0500 Update release and news Reference #5985 for PostGIS 3.0.11 diff --git a/NEWS b/NEWS index eaa40f93d..9badd3e85 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ Proj 4.9+ required. - #6028, Crash indexing malformed empty polygon (Paul Ramsey) - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension + - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) PostGIS 3.0.11 diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 1d1bcd507..61585dfb6 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -19,6 +19,7 @@ 6028, Crash indexing malformed empty polygon (Paul Ramsey) 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension + 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) commit 93f63a9bd7b75a41712d9473cb7ce18ca721faa3 Author: Regina Obe Date: Sat Feb 7 00:44:16 2026 -0500 Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 Reference #5985 for PostGIS 3.0.11 diff --git a/autogen.sh b/autogen.sh index 107720845..c295435a2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -62,8 +62,12 @@ if [ ! ${LIBTOOLIZE} ]; then echo "Missing libtoolize!" exit 1 fi -LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^.* //'` +# Debian12: libtoolize (GNU libtool) 2.4.7 +# Debian13: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 +LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^[^0-9]*//;s/ .*//'` +echo "LIBTOOLIZE_VER=${LIBTOOLIZE_VER}" LIBTOOLIZE_MAJOR_VER=`echo ${LIBTOOLIZE_VER} | cut -f1 -d'.'` +echo "LIBTOOLIZE_MAJOR_VER=${LIBTOOLIZE_MAJOR_VER}" # TODO: Check libtool version and add --install option only for 1.9b+ LTOPTS="--force --copy" ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + autogen.sh | 6 +++++- doc/release_notes.xml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 6 22:47:05 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 06:47:05 -0000 Subject: [PostGIS] #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches In-Reply-To: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> References: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> Message-ID: <061.5df4afbc801f028c13ca2179399b7e8a@osgeo.org> #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches ----------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Resolution: | Keywords: ----------------------+---------------------------- Comment (by robe): In [changeset:"93f63a9bd7b75a41712d9473cb7ce18ca721faa3/git" 93f63a/git]: {{{#!CommitTicketReference repository="git" revision="93f63a9bd7b75a41712d9473cb7ce18ca721faa3" Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 References #5985 for PostGIS 3.0.12 }}} News on [39428a2cf7/git] -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 6 22:50:52 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 6 Feb 2026 22:50:52 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.1 updated. 3.1.11-49-g09014579e Message-ID: <20260207065052.9E9D4112DC6@trac.osgeo.org> 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, stable-3.1 has been updated via 09014579e7ff29c698801b4419e8f49cc6f6b1d4 (commit) from d80f7b65dbb9a5f3283badd9de9dfee8470aa866 (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 09014579e7ff29c698801b4419e8f49cc6f6b1d4 Author: Regina Obe Date: Sat Feb 7 01:48:49 2026 -0500 Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 Closes #5985 for PostGIS 3.1.13 diff --git a/NEWS b/NEWS index 115a8900e..c16e1e076 100644 --- a/NEWS +++ b/NEWS @@ -20,7 +20,8 @@ PostGIS 3.1.13 (EOL) - #5962, Consistent clipping of MULTI/POINT (Paul Ramsey) - #6028, Crash indexing malformed empty polygon (Paul Ramsey) - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires - by extension are owned by extension + by extension are owned by extension + - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) PostGIS 3.1.12 diff --git a/autogen.sh b/autogen.sh index 107720845..c295435a2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -62,8 +62,12 @@ if [ ! ${LIBTOOLIZE} ]; then echo "Missing libtoolize!" exit 1 fi -LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^.* //'` +# Debian12: libtoolize (GNU libtool) 2.4.7 +# Debian13: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 +LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^[^0-9]*//;s/ .*//'` +echo "LIBTOOLIZE_VER=${LIBTOOLIZE_VER}" LIBTOOLIZE_MAJOR_VER=`echo ${LIBTOOLIZE_VER} | cut -f1 -d'.'` +echo "LIBTOOLIZE_MAJOR_VER=${LIBTOOLIZE_MAJOR_VER}" # TODO: Check libtool version and add --install option only for 1.9b+ LTOPTS="--force --copy" diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 7ea5828df..b92d8c349 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -26,6 +26,7 @@ 6028, Crash indexing malformed empty polygon (Paul Ramsey) 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension + #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 ++- autogen.sh | 6 +++++- doc/release_notes.xml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 6 22:50:54 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 06:50:54 -0000 Subject: [PostGIS] #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches In-Reply-To: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> References: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> Message-ID: <061.124981e69d03c464c492c04284091325@osgeo.org> #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches ----------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Resolution: fixed | Keywords: ----------------------+---------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: reopened => closed Comment: In [changeset:"09014579e7ff29c698801b4419e8f49cc6f6b1d4/git" 0901457/git]: {{{#!CommitTicketReference repository="git" revision="09014579e7ff29c698801b4419e8f49cc6f6b1d4" Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 Closes #5985 for PostGIS 3.1.13 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 02:50:26 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 02:50:26 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.7-64-g773847871 Message-ID: <20260207105026.AD59E113C90@trac.osgeo.org> 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, stable-3.2 has been updated via 773847871a9edcb021432a3bcb1f7f8b5b975c89 (commit) via 14aab0b4fb3bdc0af5b1fdfeb5a3ea62b52920d7 (commit) from d19a022dfbf9f32ef8095b19dc4036892ecc3683 (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 773847871a9edcb021432a3bcb1f7f8b5b975c89 Author: Regina Obe Date: Sat Feb 7 05:50:17 2026 -0500 Prep for 3.2.9 release diff --git a/NEWS b/NEWS index e1b54c1e7..7793acada 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ Proj 4.9+ required. - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) PostGIS 3.2.8 2024/12/22 diff --git a/Version.config b/Version.config index 3bd8a71e9..52de94db6 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=2 -POSTGIS_MICRO_VERSION=9dev +POSTGIS_MICRO_VERSION=9 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 81cb2d2ba..5cbc4aa88 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,6 +2,39 @@ Appendix Release Notes + + + PostGIS 3.2.9 + 2026/02/07 + PostgreSQL 9.6-15 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. + + Bug Fixes + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) + 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) + 5925, #5946, [topology] Have GetFaceContainingPoint survive EMPTY edges (Sandro Santilli) + 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) + 5908, [topology] Fix crash in GetFaceContainingPoint (Sandro Santilli) + 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) + 5876, Fix ST_AddPoint with empty point argument (Paul Ramsey) + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 5885, Fix documentation about grid-based overlay operations (Sandro Santilli) + 5921, Crash freeing uninitialized pointer (Arsenii Mukhin) + 5912, Crash on GML with xlink and no prefix (Paul Ramsey) + 5905, Crash on deeply nested geometries (Paul Ramsey) + 5909, ST_ValueCount crashes on empty table (Paul Ramsey) + 5917, ST_Relate becomes unresponsive (Paul Ramsey) + 5991, CircularString distance error (Paul Ramsey) + 5962, Consistent clipping of MULTI/POINT (Paul Ramsey) + 5989, CurvePolygon distance error (Paul Ramsey) + 6028, Crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required + by extension are owned by extension + authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + + PostGIS 3.2.8 2024/12/22 commit 14aab0b4fb3bdc0af5b1fdfeb5a3ea62b52920d7 Author: Regina Obe Date: Sat Feb 7 05:47:51 2026 -0500 Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 Closes #5985 for PostGIS 3.2.9 diff --git a/autogen.sh b/autogen.sh index 107720845..c295435a2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -62,8 +62,12 @@ if [ ! ${LIBTOOLIZE} ]; then echo "Missing libtoolize!" exit 1 fi -LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^.* //'` +# Debian12: libtoolize (GNU libtool) 2.4.7 +# Debian13: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 +LIBTOOLIZE_VER=`${LIBTOOLIZE} --version | ${GREP} -E "^.*[0-9]\.[0-9]" | ${SED} 's/^[^0-9]*//;s/ .*//'` +echo "LIBTOOLIZE_VER=${LIBTOOLIZE_VER}" LIBTOOLIZE_MAJOR_VER=`echo ${LIBTOOLIZE_VER} | cut -f1 -d'.'` +echo "LIBTOOLIZE_MAJOR_VER=${LIBTOOLIZE_MAJOR_VER}" # TODO: Check libtool version and add --install option only for 1.9b+ LTOPTS="--force --copy" ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + Version.config | 2 +- autogen.sh | 6 +++++- doc/release_notes.xml | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 02:50:29 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 10:50:29 -0000 Subject: [PostGIS] #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches In-Reply-To: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> References: <046.7455b84f2707cf78b2ee8be96d131edc@osgeo.org> Message-ID: <061.a17de4e00c245d4b4feebee7a2dde68d@osgeo.org> #5985: Can't do configure on trixie for stable-3.3 thru stable-3.5 branches ----------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Resolution: fixed | Keywords: ----------------------+---------------------------- Comment (by Regina Obe ): In [changeset:"14aab0b4fb3bdc0af5b1fdfeb5a3ea62b52920d7/git" 14aab0b/git]: {{{#!CommitTicketReference repository="git" revision="14aab0b4fb3bdc0af5b1fdfeb5a3ea62b52920d7" Fix support for Debian's libtool version Version string is: libtoolize (GNU libtool) 2.5.4 Debian-2.5.4-4 Closes #5985 for PostGIS 3.2.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 05:13:45 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 05:13:45 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.7-65-g9c9a4ab60 Message-ID: <20260207131345.59259117F84@trac.osgeo.org> 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, stable-3.2 has been updated via 9c9a4ab6052b2da23dd7b8e239d14b9d7bddc1b4 (commit) from 773847871a9edcb021432a3bcb1f7f8b5b975c89 (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 9c9a4ab6052b2da23dd7b8e239d14b9d7bddc1b4 Author: Regina Obe Date: Sat Feb 7 06:32:08 2026 -0500 Try to fix xml issue Add missing upgrade path diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 5cbc4aa88..2969d34cb 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,7 +2,6 @@ Appendix Release Notes - PostGIS 3.2.9 2026/02/07 @@ -12,12 +11,12 @@ 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) - 5925, #5946, [topology] Have GetFaceContainingPoint survive EMPTY edges (Sandro Santilli) + 5925, 5946, [topology] Have GetFaceContainingPoint survive EMPTY edges (Sandro Santilli) 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) 5908, [topology] Fix crash in GetFaceContainingPoint (Sandro Santilli) 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) 5876, Fix ST_AddPoint with empty point argument (Paul Ramsey) - 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) 5885, Fix documentation about grid-based overlay operations (Sandro Santilli) 5921, Crash freeing uninitialized pointer (Arsenii Mukhin) 5912, Crash on GML with xlink and no prefix (Paul Ramsey) @@ -27,14 +26,14 @@ 5991, CircularString distance error (Paul Ramsey) 5962, Consistent clipping of MULTI/POINT (Paul Ramsey) 5989, CurvePolygon distance error (Paul Ramsey) - 6028, Crash indexing malformed empty polygon (Paul Ramsey) + 6028, Crash indexing malformed empty polygon (Paul Ramsey) GH-841, small memory leak in address_standardizer (Maxim Korotkov) - 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required - by extension are owned by extension - authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + + PostGIS 3.2.8 2024/12/22 diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index c4c9b021e..21ac7e760 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -74,7 +74,7 @@ UPGRADEABLE_VERSIONS = \ 3.0.12 \ 3.1.0 \ 3.1.1 \ - 3.1.2 \ + 3.1.2 \ 3.1.3 \ 3.1.4 \ 3.1.5 \ @@ -85,6 +85,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ ----------------------------------------------------------------------- Summary of changes: doc/release_notes.xml | 13 ++++++------- extensions/upgradeable_versions.mk | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 11:57:03 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 19:57:03 -0000 Subject: [PostGIS] #6041: PostGIS 3.0 no longer compiles against PG 9.6 Message-ID: <046.1bf601c50b702279a7e9a5153ec88d5d@osgeo.org> #6041: PostGIS 3.0 no longer compiles against PG 9.6 ---------------------+---------------------------- Reporter: robe | Owner: pramsey Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Keywords: | ---------------------+---------------------------- I think something got added to PostGIS 3.0 that is incompatible with 9.6. Debbie can no longer compile it. https://debbie.postgis.net/job/PostGIS_Regress/36700 {{{ 02:58:06 make[2]: Entering directory '/var/lib/jenkins/workspace/postgis/branches/3.0/raster/rt_pg' 02:58:06 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration- after-statement -Wendif-labels -Wmissing-format-attribute -Wformat- security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno- format-truncation -Wno-stringop-truncation -g -O2 -fPIC "-I../../liblwgeom" -I/var/lib/jenkins/workspace/geos/rel-3.10w64/include -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -isystem /usr/include /mit-krb5 -I/usr/include/p11-kit-1 -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -std=gnu99 -g -O2 -fno-math-errno -fno-signed- zeros -I/var/lib/jenkins/workspace/gdal/rel-3.10w64/include "-I../../libpgcommon" -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -isystem /usr/include/mit-krb5 -I/usr/include/p11-kit-1 -I../rt_core -I. -I./ -I/var/lib/jenkins/workspace/pg/rel/pg9.6w64/include/postgresql/server -I/var/lib/jenkins/workspace/pg/rel/pg9.6w64/include/postgresql/internal -D_GNU_SOURCE -c -o rtpostgis.o rtpostgis.c 02:58:06 rtpostgis.c: In function ?_PG_init?: 02:58:06 rtpostgis.c:545:25: error: passing argument 4 of ?DefineCustomBoolVariable? from incompatible pointer type [-Wincompatible- pointer-types] 02:58:06 545 | &enable_outdb_rasters, /* valueAddr */ 02:58:06 | ^~~~~~~~~~~~~~~~~~~~~ 02:58:06 | | 02:58:06 | _Bool * 02:58:06 In file included from rtpostgis.c:134: 02:58:06 /var/lib/jenkins/workspace/pg/rel/pg9.6w64/include/postgresql/server/utils/guc.h:286:56: note: expected ?bool *? {aka ?char *?} but argument is of type ?_Bool *? 02:58:06 286 | bool *valueAddr, 02:58:06 | ~~~~~~^~~~~~~~~ 02:58:06 rtpostgis.c:550:25: error: passing argument 9 of ?DefineCustomBoolVariable? from incompatible pointer type [-Wincompatible- pointer-types] 02:58:06 550 | rtpg_assignHookEnableOutDBRasters, /* GucBoolAssignHook assign_hook */ 02:58:06 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 02:58:06 | | 02:58:06 | void (*)(_Bool, void *) 02:58:06 /var/lib/jenkins/workspace/pg/rel/pg9.6w64/include/postgresql/server/utils/guc.h:291:68: note: expected ?GucBoolAssignHook? {aka ?void (*)(char, void *)?} but argument is of type ?void (*)(_Bool, void *)? 02:58:06 291 | GucBoolAssignHook assign_hook, 02:58:06 | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ 02:58:06 make[2]: *** [: rtpostgis.o] Error 1 02:58:06 make[2]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.0/raster/rt_pg' 02:58:06 make[1]: *** [Makefile:32: pglib] Error 2 02:58:06 make[1]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.0/raster' 02:58:06 make: *** [GNUmakefile:20: all] Error 1 02:58:06 Build step 'Execute shell' marked build as failure 02:58:06 [Gitea] do not publish assets due to build being non-Successfully 02:58:06 Triggering a new build of PostgreSQL stop 02:58:06 Finished: FAILURE }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 12:13:57 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 12:13:57 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.11-28-g768b4c2b3 Message-ID: <20260207201357.8E5F713B494@trac.osgeo.org> 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, stable-3.0 has been updated via 768b4c2b3c27efca4682ed68a4f8d5af9ba08377 (commit) from 39428a2cf7c596821d9a9887197a55f0e7b55d71 (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 768b4c2b3c27efca4682ed68a4f8d5af9ba08377 Author: Regina Obe Date: Sat Feb 7 15:13:28 2026 -0500 Add back 9.6 testing on GHA diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64e70546b..8340d27c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: # - { tag: latest, mode: tests } - { tag: pg11-geos37-gdal24-proj52, mode: tests } - { tag: pg10-geos36-gdal23-proj49, mode: tests } - #- { tag: pg96-geos36-gdal22-proj49, mode: tests } + - { tag: pg96-geos36-gdal22-proj49, mode: tests } #- { tag: pg95-geos36-gdal21-proj48, mode: tests } runs-on: ubuntu-latest ----------------------------------------------------------------------- Summary of changes: .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 12:19:47 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 20:19:47 -0000 Subject: [PostGIS] #6041: PostGIS 3.0 no longer compiles against PG 9.6 In-Reply-To: <046.1bf601c50b702279a7e9a5153ec88d5d@osgeo.org> References: <046.1bf601c50b702279a7e9a5153ec88d5d@osgeo.org> Message-ID: <061.1d5bfadc31d7fc69f0e183d425e4d69d@osgeo.org> #6041: PostGIS 3.0 no longer compiles against PG 9.6 ----------------------+---------------------------- Reporter: robe | Owner: pramsey Type: defect | Status: closed Priority: blocker | Milestone: PostGIS 3.0.12 Component: postgis | Version: 3.5.x Resolution: invalid | Keywords: ----------------------+---------------------------- Changes (by robe): * resolution: => invalid * status: new => closed Comment: I think it must be a debbie specific issue. Note sure why I 9.6 was failing before on GHA when I first took it out, but I put it back and it's working. https://github.com/postgis/postgis/actions/runs/21786207466/job/62858017385 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 12:49:47 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 20:49:47 -0000 Subject: [PostGIS] #5899: pg_upgrade fails restore geography because spatial_ref_sys does not exist In-Reply-To: <046.7db8fae173ff95d3422792441e5a0a68@osgeo.org> References: <046.7db8fae173ff95d3422792441e5a0a68@osgeo.org> Message-ID: <061.c1f99690b1865a627dbeb83ad277388e@osgeo.org> #5899: pg_upgrade fails restore geography because spatial_ref_sys does not exist ----------------------+--------------------------- Reporter: robe | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: 3.4.x Resolution: | Keywords: ----------------------+--------------------------- Changes (by robe): * milestone: PostGIS 3.2.9 => PostGIS 3.7.0 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 12:50:27 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 20:50:27 -0000 Subject: [PostGIS] #5989: ST_Distance error on CurvePolygon In-Reply-To: <049.160f5b03509401c2e12090c58b6e5840@osgeo.org> References: <049.160f5b03509401c2e12090c58b6e5840@osgeo.org> Message-ID: <064.830ca46accc7e18cac0dfee6502d3cc1@osgeo.org> #5989: ST_Distance error on CurvePolygon ----------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: reopened Priority: high | Milestone: PostGIS 3.7.0 Component: postgis | Version: 3.3.x Resolution: | Keywords: ----------------------+--------------------------- Changes (by robe): * milestone: PostGIS 3.3.9 => PostGIS 3.7.0 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 13:07:54 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 21:07:54 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.ae8a9a51801ce5d8ff29e5fd6f7970c7@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by robe): I'll have to think about the removing the file entirely. I think we might still need it cause there are occasions we remove a function from the extension when we deprecate a function but can't remove it because the user has views bound to it. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 13:24:45 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 13:24:45 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.7-73-g77a390f2e Message-ID: <20260207212445.5121913CDB6@trac.osgeo.org> 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, stable-3.3 has been updated via 77a390f2e97d1a5fb9f6cad8ba0fa438b6fd208f (commit) via 365f2940ccf344157f2d58a376d0242e270a68d2 (commit) from e20d4da2f119e193c195afe7087d14772b969b29 (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 77a390f2e97d1a5fb9f6cad8ba0fa438b6fd208f Author: Regina Obe Date: Sat Feb 7 16:24:39 2026 -0500 Prepare for releae of PostGIS 3.3.9 diff --git a/NEWS b/NEWS index b8e5e4ae8..f57ba5eba 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.3.9dev -xxxx-xx-xx +PostGIS 3.3.9 +2026-02-07 PostgreSQL 11-17 required. GEOS 3.6+ required but GEOS 3.11+ to take advantage of all features. Proj 4.9+ required. @@ -33,6 +33,7 @@ Proj 4.9+ required. - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) PostGIS 3.3.8 diff --git a/README.postgis b/README.postgis index 3859b0623..ce24a03bf 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 3.3.7 -:Date: 2024-09-05 +:Version: 3.3.9 +:Date: 2026-02-07 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index dd5ad6183..9e124976a 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=3 -POSTGIS_MICRO_VERSION=9dev +POSTGIS_MICRO_VERSION=9 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/ci/winnie/winnie_common.sh b/ci/winnie/winnie_common.sh index 244ba3287..67b405bf5 100644 --- a/ci/winnie/winnie_common.sh +++ b/ci/winnie/winnie_common.sh @@ -11,7 +11,7 @@ export PROJECTS=/projects export MSYS2_ARG_CONV_EXCL=/config/tags if [[ "${OVERRIDE}" == '' ]] ; then - export GEOS_VER=3.13.1 + export GEOS_VER=3.14.1 export GDAL_VER=3.9.2 export PROJ_VER=8.2.1 export SFCGAL_VER=1.5.2 @@ -64,6 +64,7 @@ fi; export CGAL_VER=5.6.1 BOOST_VER=1.84.0 export BOOST_VER_WU=1_84_0 +export XMLLINT= export LZ4_PATH=${PROJECTS}/lz4/rel-lz4-${LZ4_VER}w${OS_BUILD}${GCC_TYPE} diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 23d9501d1..292f6160c 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,6 +2,42 @@ Appendix Release Notes + + PostGIS 3.3.9 + 2026/02/07 + PostgreSQL 11-17 required. GEOS 3.6+ required but GEOS 3.11+ to take advantage of all features. Proj 4.9+ required. + + Bug Fixes + 5978, fix parsing of constraints in geometry_columns (Paul Ramsey) + 5977, Fix downgrade protection with standard conforming strings off (Sandro Santilli) + 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) + 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) + 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) + 5908, [topology] Fix crash in GetFaceContainingPoint (Sandro Santilli) + 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) + 5876, Fix ST_AddPoint with empty point argument (Paul Ramsey) + 5829, geometry_columns with non-standard constraints (Paul Ramsey) + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 5885, Fix documentation about grid-based overlay operations (Sandro Santilli) + 5921, Crash freeing uninitialized pointer (Arsenii Mukhin) + 5912, Crash on GML with xlink and no prefix (Paul Ramsey) + 5905, Crash on deeply nested geometries (Paul Ramsey) + 5909, ST_ValueCount crashes on empty table (Paul Ramsey) + 5917, ST_Relate becomes unresponsive (Paul Ramsey) + 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + 5991, CircularString distance error (Paul Ramsey) + 5962, Consistent clipping of MULTI/POINT (Paul Ramsey) + 5989, CurvePolygon distance error (Paul Ramsey) + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) + 6028, crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required + by extension are owned by extension + authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) + + PostGIS 3.3.8 2024/12/22 diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 7d1c36bbe..1de7c484b 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -85,6 +85,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ @@ -94,6 +95,7 @@ UPGRADEABLE_VERSIONS = \ 3.2.6 \ 3.2.7 \ 3.2.8 \ + 3.2.9 \ 3.3.0 \ 3.3.1 \ 3.3.2 \ commit 365f2940ccf344157f2d58a376d0242e270a68d2 Author: Regina Obe Date: Sat Feb 7 16:13:49 2026 -0500 Bug in upgrade scripts for topology and tiger geocoder References #5853 for PostGIS 3.3.9 diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index 632385133..8bf3f8dea 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -16,7 +16,7 @@ --------------------------- -- postgis_extension_remove_objects: This function removes objects of a particular class from an extension -- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention +-- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extension -- So we use this to remove it from extension first before we drop CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) RETURNS boolean AS @@ -30,7 +30,7 @@ DECLARE var_sql_list text := ''; var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; + var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_proc' ELSE '' END; var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +++-- README.postgis | 4 ++-- Version.config | 2 +- ci/winnie/winnie_common.sh | 3 ++- doc/release_notes.xml | 36 ++++++++++++++++++++++++++++++ extensions/postgis_extension_helper.sql.in | 4 ++-- extensions/upgradeable_versions.mk | 2 ++ 7 files changed, 48 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 13:24:51 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 07 Feb 2026 21:24:51 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.0ced71ce86743b8caea6fc2145b1ff86@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"365f2940ccf344157f2d58a376d0242e270a68d2/git" 365f294/git]: {{{#!CommitTicketReference repository="git" revision="365f2940ccf344157f2d58a376d0242e270a68d2" Bug in upgrade scripts for topology and tiger geocoder References #5853 for PostGIS 3.3.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 18:40:13 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 02:40:13 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.600520aa12d1e29c0433661ae39b2c6f@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by robe): Okay now I see what you mean that fixing it actually breaks things because of the change. I'll revert for now until I have more time to think about this. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 18:45:15 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 18:45:15 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.7-74-g023e57521 Message-ID: <20260208024516.0B86E16A07E@trac.osgeo.org> 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, stable-3.3 has been updated via 023e57521e8c33c6ef862f17462389b55ba46e1e (commit) from 77a390f2e97d1a5fb9f6cad8ba0fa438b6fd208f (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 023e57521e8c33c6ef862f17462389b55ba46e1e Author: Regina Obe Date: Sat Feb 7 21:45:09 2026 -0500 Revert fix. References #5853 for PostGIS 3.3.9 diff --git a/NEWS b/NEWS index f57ba5eba..04408d87d 100644 --- a/NEWS +++ b/NEWS @@ -33,7 +33,6 @@ Proj 4.9+ required. - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) - - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) PostGIS 3.3.8 diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 292f6160c..9db92776f 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -35,7 +35,6 @@ 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) - 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index 8bf3f8dea..632385133 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -16,7 +16,7 @@ --------------------------- -- postgis_extension_remove_objects: This function removes objects of a particular class from an extension -- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extension +-- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention -- So we use this to remove it from extension first before we drop CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) RETURNS boolean AS @@ -30,7 +30,7 @@ DECLARE var_sql_list text := ''; var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_proc' ELSE '' END; + var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN ----------------------------------------------------------------------- Summary of changes: NEWS | 1 - doc/release_notes.xml | 1 - extensions/postgis_extension_helper.sql.in | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 18:45:17 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 02:45:17 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.67f4975e83d3f23b9932df407094d9a3@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"023e57521e8c33c6ef862f17462389b55ba46e1e/git" 023e575/git]: {{{#!CommitTicketReference repository="git" revision="023e57521e8c33c6ef862f17462389b55ba46e1e" Revert fix. References #5853 for PostGIS 3.3.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 19:57:57 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 03:57:57 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.f6129238f352dc7bcd675ed3623b6896@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"aff83b101cb1838f39670502e972d71645c5786a/git" aff83b1/git]: {{{#!CommitTicketReference repository="git" revision="aff83b101cb1838f39670502e972d71645c5786a" Remove postgis_extension_remove_objects References #5853 for PostGIS 3.3.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 19:57:56 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 19:57:56 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.7-75-gaff83b101 Message-ID: <20260208035756.6822116BAAD@trac.osgeo.org> 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, stable-3.3 has been updated via aff83b101cb1838f39670502e972d71645c5786a (commit) from 023e57521e8c33c6ef862f17462389b55ba46e1e (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 aff83b101cb1838f39670502e972d71645c5786a Author: Regina Obe Date: Sat Feb 7 22:03:17 2026 -0500 Remove postgis_extension_remove_objects References #5853 for PostGIS 3.3.9 diff --git a/NEWS b/NEWS index 04408d87d..f57ba5eba 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ Proj 4.9+ required. - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) PostGIS 3.3.8 diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 9db92776f..292f6160c 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -35,6 +35,7 @@ 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) + 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index 632385133..b0f73015b 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -14,72 +14,6 @@ -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extention install/upgrade process --------------------------- --- postgis_extension_remove_objects: This function removes objects of a particular class from an extension --- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention --- So we use this to remove it from extension first before we drop -CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) - RETURNS boolean AS -$$ -DECLARE - var_sql text := ''; - var_r record; - var_result boolean := false; - var_class text := ''; - var_is_aggregate boolean := false; - var_sql_list text := ''; - var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); -BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; - var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; - - IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$; - ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$; - END IF; - - FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate - LOOP - var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';'; - END LOOP; - IF var_sql > '' THEN - EXECUTE var_sql; - var_result := true; - END IF; - - RETURN var_result; -END; -$$ -LANGUAGE plpgsql VOLATILE; CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) RETURNS boolean AS diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql index 2fb1d1756..756dc80f8 100644 --- a/extensions/postgis_extension_helper_uninstall.sql +++ b/extensions/postgis_extension_helper_uninstall.sql @@ -13,7 +13,6 @@ -- -- This drops extension helper functions -- and should be called at the end of the extension upgrade file -DROP FUNCTION postgis_extension_remove_objects(text, text); DROP FUNCTION postgis_extension_drop_if_exists(text, text); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text); diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index 35ec1ee8a..1844c10d8 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -84,7 +84,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_ | $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \ > $@ -sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql +sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql cat $^ > $@ echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@ cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@ diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index 704a145b6..000000000 --- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be readded --- during upgrade -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE'); diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index c8eb43aba..427bb2b0f 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -43,7 +43,6 @@ DATA_built = \ EXTENSION_UPGRADE_SCRIPTS = \ extlock.sql \ ../postgis_extension_helper.sql \ - sql_bits/remove_from_extension.sql.in \ sql/topology_upgrade.sql \ sql_bits/mark_editable_objects.sql.in \ sql/topology_comments.sql \ diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index 9d695d6a3..000000000 --- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be readded --- during upgrade -SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + doc/release_notes.xml | 1 + extensions/postgis_extension_helper.sql.in | 66 ---------------------- extensions/postgis_extension_helper_uninstall.sql | 1 - extensions/postgis_tiger_geocoder/Makefile.in | 2 +- .../sql_bits/remove_from_extension.sql.in | 19 ------- extensions/postgis_topology/Makefile.in | 1 - .../sql_bits/remove_from_extension.sql.in | 19 ------- 8 files changed, 3 insertions(+), 107 deletions(-) delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in hooks/post-receive -- PostGIS From git at osgeo.org Sat Feb 7 20:13:34 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 20:13:34 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-77-gc85e002c6 Message-ID: <20260208041334.6C4C116C0CA@trac.osgeo.org> 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, stable-3.4 has been updated via c85e002c6c6d6b0bbac1a2f8e8f49615650abcec (commit) via d539a72e8fb6e8f2d7ccb15ff9c8c8d535745090 (commit) from b83b12349d5098c0b8cd37c2b2ff6af9178cb07d (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 c85e002c6c6d6b0bbac1a2f8e8f49615650abcec Author: Regina Obe Date: Sat Feb 7 23:13:19 2026 -0500 Prep for PostGIS 3.4.5 release diff --git a/README.postgis b/README.postgis index b150a8595..fab55b967 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 3.4.4 -:Date: 2024-12-22 +:Version: 3.4.5 +:Date: 2026-02-07 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 7e62319ac..478b78f91 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=4 -POSTGIS_MICRO_VERSION=5dev +POSTGIS_MICRO_VERSION=5 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 45abdb57b..b3edabeba 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,6 +2,63 @@ Appendix Release Notes + + PostGIS 3.4.5 + 2025/02/07 + PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. Proj 6.1+ required. + + + Bug Fixes + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) + 5978, fix parsing of constraints in geometry_columns (Paul Ramsey) + 5977, Fix downgrade protection with standard conforming strings off (Sandro Santilli) + 5947, [topology] Fix crash in ST_ModEdgeHeal (Sandro Santilli) + 5951, [topology] Fix crash in ST_GetFaceEdges with corrupted topology (Sandro Santilli) + 5925, #5946, [topology] Have GetFaceContainingPoint survive EMPTY edges (Sandro Santilli) + 5936, [topology] Do script-based upgrade in a single transaction (Sandro Santilli) + 5922, [topology] Fix crash in TopoGeo_AddLinestring with EMPTY input (Sandro Santilli) + 5908, [topology] Fix crash in GetFaceContainingPoint (Sandro Santilli) + 5907, [topology] Fix crash in TopoGeo_AddPolygon with EMPTY input (Sandro Santilli) + Do not complain about illegal option when calling shp2pgsql -? + 5564, BRIN crash fix and support for parallel in PG17+ + (Paul Ramsey, Regina Obe) + 5876, Fix ST_AddPoint with empty point argument + 5874, Line substring returns wrong answer (Paul Ramsey) + 5829, geometry_columns with non-standard constraints (Paul Ramsey) + 5818, GT-244 Fix CG_IsSolid function (Lo?c Bartoletti) + 5885, Fix documentation about grid-based overlay operations (Sandro Santilli) + 5921, Crash freeing uninitialized pointer (Arsenii Mukhin) + 5912, Crash on GML with xlink and no prefix (Paul Ramsey) + 5905, Crash on deeply nested geometries (Paul Ramsey) + 5909, ST_ValueCount crashes on empty table (Paul Ramsey) + 5917, ST_Relate becomes unresponsive (Paul Ramsey) + Support build under Pg19 (Paul Ramsey) + 5082, LRS proportions clamped to [0,1] (Pawel Ostrowski) + 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + 5991, CircularString distance error (Paul Ramsey) + 5989, ST_Distance error on CurvePolygon (Paul Ramsey) + 5962, Consistent clipping of MULTI/POINT (Paul Ramsey) + 5754, ST_ForcePolygonCCW reverses lines (Paul Ramsey) + 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) + 6028, crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension (Andrey Borodin, Yandex) + 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) + + + + + Enhancements + 5782, Improve robustness of min distance calculation (Sandro Santilli) + + + + Breaking Changes + 5799, make ST_TileEnvelope clips envelopes to tile plane extent (Paul Ramsey) + + PostGIS 3.4.4 2024/09/04 diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index b4f6f26d0..860f0ee6e 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -71,9 +71,10 @@ UPGRADEABLE_VERSIONS = \ 3.0.9 \ 3.0.10 \ 3.0.11 \ + 3.0.12 \ 3.1.0 \ 3.1.1 \ - 3.1.2 \ + 3.1.2 \ 3.1.3 \ 3.1.4 \ 3.1.5 \ @@ -84,6 +85,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ @@ -93,6 +95,7 @@ UPGRADEABLE_VERSIONS = \ 3.2.6 \ 3.2.7 \ 3.2.8 \ + 3.2.9 \ 3.3.0 \ 3.3.1 \ 3.3.2 \ @@ -102,6 +105,7 @@ UPGRADEABLE_VERSIONS = \ 3.3.6 \ 3.3.7 \ 3.3.8 \ + 3.3.9 \ 3.4.0 \ 3.4.1 \ 3.4.2 \ commit d539a72e8fb6e8f2d7ccb15ff9c8c8d535745090 Author: Regina Obe Date: Sat Feb 7 22:03:17 2026 -0500 Remove postgis_extension_remove_objects References #5853 for PostGIS 3.4.5 diff --git a/NEWS b/NEWS index e38c14aa7..caf69b355 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.4.5dev -xxxx/xx/xx +PostGIS 3.4.5 +2026/02/07 PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. Proj 6.1+ required. @@ -42,6 +42,7 @@ Proj 6.1+ required. - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension (Andrey Borodin, Yandex) + - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) PostGIS 3.4.4 2024/12/22 diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index 632385133..b0f73015b 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -14,72 +14,6 @@ -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extention install/upgrade process --------------------------- --- postgis_extension_remove_objects: This function removes objects of a particular class from an extension --- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention --- So we use this to remove it from extension first before we drop -CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) - RETURNS boolean AS -$$ -DECLARE - var_sql text := ''; - var_r record; - var_result boolean := false; - var_class text := ''; - var_is_aggregate boolean := false; - var_sql_list text := ''; - var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); -BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; - var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; - - IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$; - ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$; - END IF; - - FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate - LOOP - var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';'; - END LOOP; - IF var_sql > '' THEN - EXECUTE var_sql; - var_result := true; - END IF; - - RETURN var_result; -END; -$$ -LANGUAGE plpgsql VOLATILE; CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) RETURNS boolean AS diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql index 2fb1d1756..756dc80f8 100644 --- a/extensions/postgis_extension_helper_uninstall.sql +++ b/extensions/postgis_extension_helper_uninstall.sql @@ -13,7 +13,6 @@ -- -- This drops extension helper functions -- and should be called at the end of the extension upgrade file -DROP FUNCTION postgis_extension_remove_objects(text, text); DROP FUNCTION postgis_extension_drop_if_exists(text, text); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text); diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index 53de35f65..da6cb40e3 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -85,7 +85,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_ | $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \ > $@ -sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql +sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql cat $^ > $@ echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@ cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@ diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index 704a145b6..000000000 --- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be readded --- during upgrade -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE'); diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index 040fc4606..be426797c 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -43,7 +43,6 @@ DATA_built = \ EXTENSION_UPGRADE_SCRIPTS = \ extlock.sql \ ../postgis_extension_helper.sql \ - sql_bits/remove_from_extension.sql.in \ sql/topology_upgrade.sql \ sql_bits/mark_editable_objects.sql.in \ sql/topology_comments.sql \ diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index 9d695d6a3..000000000 --- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be readded --- during upgrade -SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +- README.postgis | 4 +- Version.config | 2 +- doc/release_notes.xml | 57 +++++++++++++++++++ extensions/postgis_extension_helper.sql.in | 66 ---------------------- extensions/postgis_extension_helper_uninstall.sql | 1 - extensions/postgis_tiger_geocoder/Makefile.in | 2 +- .../sql_bits/remove_from_extension.sql.in | 19 ------- extensions/postgis_topology/Makefile.in | 1 - .../sql_bits/remove_from_extension.sql.in | 19 ------- extensions/upgradeable_versions.mk | 6 +- 11 files changed, 69 insertions(+), 113 deletions(-) delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 7 20:13:37 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 04:13:37 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.53fd933e89dd15ad82ae3c84f18b6145@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"d539a72e8fb6e8f2d7ccb15ff9c8c8d535745090/git" d539a72/git]: {{{#!CommitTicketReference repository="git" revision="d539a72e8fb6e8f2d7ccb15ff9c8c8d535745090" Remove postgis_extension_remove_objects References #5853 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 20:14:07 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 04:14:07 -0000 Subject: [PostGIS] #5937: RemoveUnusedPrimitives: WARNING: Edges 2 and 1 joined by node {2} could not be healed: Healing of edges 2 and 1 was reported to remove node 4 while we expected any of {2} instead In-Reply-To: <046.b68ba783f64d0f1a287d1715be376ca3@osgeo.org> References: <046.b68ba783f64d0f1a287d1715be376ca3@osgeo.org> Message-ID: <061.9b606bb40a4dc93f6ee26e02705c3cbb@osgeo.org> #5937: RemoveUnusedPrimitives: WARNING: Edges 2 and 1 joined by node {2} could not be healed: Healing of edges 2 and 1 was reported to remove node 4 while we expected any of {2} instead -----------------------+--------------------------- Reporter: strk | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: topology | Version: 3.4.x Resolution: | Keywords: -----------------------+--------------------------- Changes (by robe): * milestone: PostGIS 3.4.5 => PostGIS 3.7.0 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 7 22:34:53 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 06:34:53 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded Message-ID: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded --------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Keywords: | --------------------------+--------------------------- {{{ 23:26:00 after-create-script ../regress/hooks/hook-after-create.sql .. ok 23:26:00 regress/core/regress .. ok in 111 ms 23:26:00 before-uninstall-script ../regress/hooks/hook-before- uninstall.sql .. ok 23:26:00 regress/uninstall .. ok (4724) 23:26:00 23:26:00 Run tests: 4 23:26:00 Failed: 0 23:26:00 Skipping upgrade test as RUNTESTFLAGS already requested upgrades 23:26:00 gmake: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' 23:26:00 SKIP: 3.4.5 -> 3.4.5 (we won't test same-version upgrade/downgrade here) 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 23:26:00 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 gave some other error: 23:26:00 Creating database 'postgis_reg'. 23:26:00 Preparing db 'postgis_reg' using: CREATE EXTENSION postgis VERSION '3.5.1dev' SCHEMA public 23:26:00 failed (Error encountered creating EXTENSION POSTGIS: /var/lib/jenkins/workspace/postgis/tmp/3_4_pg12w64/regress_log) 23:26:00 ----------------------------------------------------------------------------- 23:26:00 NOTICE: schema "public" already exists, skipping 23:26:00 CREATE SCHEMA 23:26:00 ERROR: could not load library "/var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so": /var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so: undefined symbol: GEOSPreparedRelatePattern 23:26:00 ----------------------------------------------------------------------------- 23:26:00 gmake: *** [runtest.mk:24: check-regress] Error 1 23:26:00 gmake: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 with standard-conforming-strings off 23:26:01 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 with standard- conforming-strings off gave some other error: }}} I realized this is because the GEOS lib I have in 3.5.1 is newer than 3.4, but shouldn't it be bailing even before it tries to load the old library. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 7 23:09:04 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 7 Feb 2026 23:09:04 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-78-gcd048b71d Message-ID: <20260208070904.E285F16EF74@trac.osgeo.org> 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, stable-3.4 has been updated via cd048b71de18eaaf6247f8cf6854ec2aaa2aae85 (commit) from c85e002c6c6d6b0bbac1a2f8e8f49615650abcec (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 cd048b71de18eaaf6247f8cf6854ec2aaa2aae85 Author: Regina Obe Date: Sun Feb 8 01:55:15 2026 -0500 Remove create schema tiger_data. This should not be part of the extension diff --git a/extras/tiger_geocoder/tiger_loader_2023.sql b/extras/tiger_geocoder/tiger_loader_2023.sql index 65c497ce2..a36bea5f9 100644 --- a/extras/tiger_geocoder/tiger_loader_2023.sql +++ b/extras/tiger_geocoder/tiger_loader_2023.sql @@ -245,13 +245,6 @@ BEGIN END $$ LANGUAGE 'plpgsql'; -DO -$$ -BEGIN - CREATE SCHEMA IF NOT EXISTS tiger_data; -END -$$ LANGUAGE 'plpgsql'; - DELETE FROM loader_platform WHERE os IN ('sh', 'windows'); GRANT SELECT ON TABLE loader_platform TO public; INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command) ----------------------------------------------------------------------- Summary of changes: extras/tiger_geocoder/tiger_loader_2023.sql | 7 ------- 1 file changed, 7 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sun Feb 8 00:24:13 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 08:24:13 -0000 Subject: [PostGIS] #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member =?utf-8?b?4oCYcG9zdGdpc19mbGF0YnVmZmVyczo6c3BhbjxULCBF?= =?utf-8?b?eHRlbnQ+Ojpjb3VudF/igJk=?= Message-ID: <046.4a022e415b86c62b7e2ba67d6e3cb029@osgeo.org> #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member ?postgis_flatbuffers::span::count_? ---------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: blocker | Milestone: PostGIS 3.2.9 Component: build | Version: 3.5.x Keywords: | ---------------------+--------------------------- Getting a flatgeobuf error {{{ 14:53:39 make[1]: Entering directory '/var/lib/jenkins/workspace/postgis/branches/3.2/postgis' 14:53:39 make -C ../deps/wagyu all 14:53:39 make[2]: Entering directory '/var/lib/jenkins/workspace/postgis/branches/3.2/deps/wagyu' 14:53:39 gcc -std=c++11 -x c++ -I../../liblwgeom -Iinclude -I/var/lib/jenkins/workspace/geos/rel-3.10w64/include -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -isystem /usr/include /mit-krb5 -I/usr/include/p11-kit-1 -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -DNDEBUG -fPIC -DPIC -c -o lwgeom_wagyu.o lwgeom_wagyu.cpp 14:53:41 ar rs libwagyu.la lwgeom_wagyu.o 14:53:41 ar: creating libwagyu.la 14:53:41 make[2]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.2/deps/wagyu' 14:53:41 make -C ../deps/flatgeobuf all 14:53:41 make[2]: Entering directory '/var/lib/jenkins/workspace/postgis/branches/3.2/deps/flatgeobuf' 14:53:41 gcc -std=c++11 -x c++ -I../../liblwgeom -Iinclude -I../../liblwgeom -I/include -I/var/lib/jenkins/workspace/geos/rel-3.10w64/include -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -isystem /usr/include /mit-krb5 -I/usr/include/p11-kit-1 -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -DNDEBUG -fPIC -DPIC -Dflatbuffers=postgis_flatbuffers -c -o flatgeobuf_c.o flatgeobuf_c.cpp 14:53:42 In file included from include/flatbuffers/flatbuffers.h:21, 14:53:42 from feature_generated.h:7, 14:53:42 from flatgeobuf_c.cpp:26: 14:53:42 include/flatbuffers/stl_emulation.h: In member function ?postgis_flatbuffers::span& postgis_flatbuffers::span::operator=(const postgis_flatbuffers::span&)?: 14:53:42 include/flatbuffers/stl_emulation.h:549:12: error: assignment of read-only member ?postgis_flatbuffers::span::count_? 14:53:42 549 | count_ = other.count_; 14:53:42 | ~~~~~~~^~~~~~~~~~~~~~ 14:53:42 make[2]: *** [Makefile:54: flatgeobuf_c.o] Error 1 14:53:42 make[2]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.2/deps/flatgeobuf' 14:53:42 make[1]: *** [Makefile:213: ../deps/flatgeobuf/libflatgeobuf.la] Error 2 14:53:42 make[1]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.2/postgis' 14:53:42 make: *** [GNUmakefile:22: all] Error 1 14:53:42 Build step 'Execute shell' marked build as failure 14:53:42 [Gitea] do not publish assets due to build being non-Successfully 14:53:42 Triggering a new bui }}} Last success was in october. This is on PostgreSQL 14.20 and 11 at least. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 00:46:27 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 00:46:27 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.4-22-gde3d20d6a Message-ID: <20260208084628.1628E210D7@trac.osgeo.org> 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, stable-3.5 has been updated via de3d20d6abd354189fca0f24e7b63dde5107cc90 (commit) via 3336330476934147372f2487256dafd369a01178 (commit) from 50e75f9684758b1e1b9d8810395b1cbef3d18d60 (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 de3d20d6abd354189fca0f24e7b63dde5107cc90 Author: Regina Obe Date: Sun Feb 8 03:46:21 2026 -0500 Prep for PostGIS 3.5.5 release diff --git a/NEWS b/NEWS index e2ad1cad2..e4d319435 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.5.5dev -xxxx/xx/xx +PostGIS 3.5.5 +2026/02/08 To take advantage of all postgis_sfcgal extension features SFCGAL 1.5+ is needed. PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required. @@ -14,6 +14,7 @@ PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required. - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension + - #5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) PostGIS 3.5.4 2025/10/16 diff --git a/README.postgis b/README.postgis index a474b20f8..671780f04 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 3.5.4 -:Date: 2025-10-16 +:Version: 3.5.5 +:Date: 2026-02-08 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 84305269c..0e17c2ec3 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=5 -POSTGIS_MICRO_VERSION=5dev +POSTGIS_MICRO_VERSION=5 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index f9db79bc1..0bec15cbf 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -3,6 +3,24 @@ Appendix Release Notes +
+ PostGIS 3.5.5 + 2026/02/08 + This version requires PostgreSQL 12-18, GEOS 3.8 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.12+ is needed. To take advantage of all SFCGAL features, SFCGAL 1.5.0+ is needed. + + Bug Fixes + 5959, #5984, Prevent histogram target overflow when analysing massive tables (Darafei Praliaskouski) + 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) + 6028, crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + by extension are owned by extension + 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) + +
+
PostGIS 3.5.4 2025/10/16 @@ -161,7 +179,7 @@ (Jan Tojnar) #5496, ST_Clip all variants replaced, will require rebuilding of materialized views that use them (funding from The National Institute for Agricultural - and Food Research and Technology (INIA-CSIC)), + and Food Research and Technology (INIA-CSIC)), Regina Obe #5659, ST_DFullyWithin behaviour has changed to be ST_Contains(ST_Buffer(A, R), B) (Paul Ramsey) diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 0a5f85aa9..ba63176b3 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -74,7 +74,7 @@ UPGRADEABLE_VERSIONS = \ 3.0.12 \ 3.1.0 \ 3.1.1 \ - 3.1.2 \ + 3.1.2 \ 3.1.3 \ 3.1.4 \ 3.1.5 \ @@ -86,6 +86,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ @@ -104,11 +105,13 @@ UPGRADEABLE_VERSIONS = \ 3.3.6 \ 3.3.7 \ 3.3.8 \ + 3.3.9 \ 3.4.0 \ 3.4.1 \ 3.4.2 \ 3.4.3 \ 3.4.4 \ + 3.4.4 \ 3.5.0 \ 3.5.1 \ 3.5.2 \ commit 3336330476934147372f2487256dafd369a01178 Author: Regina Obe Date: Sun Feb 8 03:10:58 2026 -0500 Remove postgis_extension_remove_objects References #5853 for PostGIS 3.5.5 diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index d5f473d16..0a80726ad 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -14,72 +14,6 @@ -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extension install/upgrade process --------------------------- --- postgis_extension_remove_objects: This function removes objects of a particular class from an extension --- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPLACE functions whose signatures have changed and we can drop them if they are part of an extension --- So we use this to remove it from extension first before we drop -CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) - RETURNS boolean AS -$$ -DECLARE - var_sql text := ''; - var_r record; - var_result boolean := false; - var_class text := ''; - var_is_aggregate boolean := false; - var_sql_list text := ''; - var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); -BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; - var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; - - IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$; - ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$; - END IF; - - FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate - LOOP - var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';'; - END LOOP; - IF var_sql > '' THEN - EXECUTE var_sql; - var_result := true; - END IF; - - RETURN var_result; -END; -$$ -LANGUAGE plpgsql VOLATILE; CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) RETURNS boolean AS diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql index 2fb1d1756..756dc80f8 100644 --- a/extensions/postgis_extension_helper_uninstall.sql +++ b/extensions/postgis_extension_helper_uninstall.sql @@ -13,7 +13,6 @@ -- -- This drops extension helper functions -- and should be called at the end of the extension upgrade file -DROP FUNCTION postgis_extension_remove_objects(text, text); DROP FUNCTION postgis_extension_drop_if_exists(text, text); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text); diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index 37193e0ae..5ce60da42 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -85,7 +85,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_ | $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \ > $@ -sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql +sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql cat $^ > $@ echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@ cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@ diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index c0fc12a3e..000000000 --- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE'); diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index 852ca1d12..0747d28fb 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -42,7 +42,6 @@ DATA_built = \ EXTENSION_UPGRADE_SCRIPTS = \ extlock.sql \ ../postgis_extension_helper.sql \ - sql_bits/remove_from_extension.sql.in \ sql/topology_upgrade.sql \ sql_bits/mark_editable_objects.sql.in \ ../postgis_extension_helper_uninstall.sql diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index cc4cca819..000000000 --- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +- README.postgis | 4 +- Version.config | 2 +- doc/release_notes.xml | 20 ++++++- extensions/postgis_extension_helper.sql.in | 66 ---------------------- extensions/postgis_extension_helper_uninstall.sql | 1 - extensions/postgis_tiger_geocoder/Makefile.in | 2 +- .../sql_bits/remove_from_extension.sql.in | 19 ------- extensions/postgis_topology/Makefile.in | 1 - .../sql_bits/remove_from_extension.sql.in | 19 ------- extensions/upgradeable_versions.mk | 5 +- 11 files changed, 30 insertions(+), 114 deletions(-) delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in hooks/post-receive -- PostGIS From trac at osgeo.org Sun Feb 8 00:46:29 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 08:46:29 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.8779b53fb75790d1032e1ce26bbe4bd3@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"3336330476934147372f2487256dafd369a01178/git" 33363304/git]: {{{#!CommitTicketReference repository="git" revision="3336330476934147372f2487256dafd369a01178" Remove postgis_extension_remove_objects References #5853 for PostGIS 3.5.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sun Feb 8 02:16:43 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 08 Feb 2026 10:16:43 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.e18c4ae52f53d9c307db9c900c7ee66a@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Old description: > {{{ > 23:26:00 after-create-script ../regress/hooks/hook-after-create.sql .. > ok > 23:26:00 regress/core/regress .. ok in 111 ms > 23:26:00 before-uninstall-script ../regress/hooks/hook-before- > uninstall.sql .. ok > 23:26:00 regress/uninstall .. ok (4724) > 23:26:00 > 23:26:00 Run tests: 4 > 23:26:00 Failed: 0 > 23:26:00 Skipping upgrade test as RUNTESTFLAGS already requested upgrades > 23:26:00 gmake: Leaving directory > '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' > 23:26:00 SKIP: 3.4.5 -> 3.4.5 (we won't test same-version > upgrade/downgrade here) > 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 > 23:26:00 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 gave some > other error: > 23:26:00 Creating database 'postgis_reg'. > 23:26:00 Preparing db 'postgis_reg' using: CREATE EXTENSION postgis > VERSION '3.5.1dev' SCHEMA public > 23:26:00 failed (Error encountered creating EXTENSION POSTGIS: > /var/lib/jenkins/workspace/postgis/tmp/3_4_pg12w64/regress_log) > 23:26:00 > ----------------------------------------------------------------------------- > 23:26:00 NOTICE: schema "public" already exists, skipping > 23:26:00 CREATE SCHEMA > 23:26:00 ERROR: could not load library > "/var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so": > /var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so: > undefined symbol: GEOSPreparedRelatePattern > 23:26:00 > ----------------------------------------------------------------------------- > 23:26:00 gmake: *** [runtest.mk:24: check-regress] Error 1 > 23:26:00 gmake: Leaving directory > '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' > 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 with > standard-conforming-strings off > 23:26:01 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 with standard- > conforming-strings off gave some other error: > }}} > > I realized this is because the GEOS lib I have in 3.5.1 is newer than > 3.4, but shouldn't it be bailing even before it tries to load the old > library. New description: {{{ 23:26:00 after-create-script ../regress/hooks/hook-after-create.sql .. ok 23:26:00 regress/core/regress .. ok in 111 ms 23:26:00 before-uninstall-script ../regress/hooks/hook-before- uninstall.sql .. ok 23:26:00 regress/uninstall .. ok (4724) 23:26:00 23:26:00 Run tests: 4 23:26:00 Failed: 0 23:26:00 Skipping upgrade test as RUNTESTFLAGS already requested upgrades 23:26:00 gmake: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' 23:26:00 SKIP: 3.4.5 -> 3.4.5 (we won't test same-version upgrade/downgrade here) 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 23:26:00 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 gave some other error: 23:26:00 Creating database 'postgis_reg'. 23:26:00 Preparing db 'postgis_reg' using: CREATE EXTENSION postgis VERSION '3.5.1dev' SCHEMA public 23:26:00 failed (Error encountered creating EXTENSION POSTGIS: /var/lib/jenkins/workspace/postgis/tmp/3_4_pg12w64/regress_log) 23:26:00 ----------------------------------------------------------------------------- 23:26:00 NOTICE: schema "public" already exists, skipping 23:26:00 CREATE SCHEMA 23:26:00 ERROR: could not load library "/var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so": /var/lib/jenkins/workspace/pg/rel/pg12w64/lib/postgresql/postgis-3.5.so: undefined symbol: GEOSPreparedRelatePattern 23:26:00 ----------------------------------------------------------------------------- 23:26:00 gmake: *** [runtest.mk:24: check-regress] Error 1 23:26:00 gmake: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.4/regress' 23:26:00 Testing postgis extension downgrade 3.5.1dev--3.4.5 with standard-conforming-strings off 23:26:01 FAIL: postgis extension downgrade 3.5.1dev--3.4.5 with standard- conforming-strings off gave some other error: }}} I realized this is because the GEOS lib I have in 3.5.1 is newer than 3.4, but shouldn't it be bailing even before it tries to load the old library. -- Comment (by strk): It fails loading 3.5.1 because it was built against a newer version of GEOS which isn't found at loading time. We could make such cases a SKIP instead of a FAIL, given the focus is on testing the target (3.4 in this case) rather than the source of the downgrade (3.5.1 in this case). Or you can pass --skip-tests to fine tune which tests to skip ("downgrade 3.5.1dev--3.4.5" in this specific case) -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 07:17:59 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 07:17:59 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.4-23-gede5ab544 Message-ID: <20260208151759.832AD16AC30@trac.osgeo.org> 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, stable-3.5 has been updated via ede5ab544f6214c1d95c9f58c38b38755f06cf3c (commit) from de3d20d6abd354189fca0f24e7b63dde5107cc90 (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 ede5ab544f6214c1d95c9f58c38b38755f06cf3c Author: Regina Obe Date: Sun Feb 8 10:17:53 2026 -0500 Fix xml validation error, should be link not ulink diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 0bec15cbf..63753deb2 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -9,15 +9,15 @@ This version requires PostgreSQL 12-18, GEOS 3.8 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.12+ is needed. To take advantage of all SFCGAL features, SFCGAL 1.5.0+ is needed. Bug Fixes - 5959, #5984, Prevent histogram target overflow when analysing massive tables (Darafei Praliaskouski) - 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) - 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) - 6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) - 6028, crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) - 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires + 5959, #5984, Prevent histogram target overflow when analysing massive tables (Darafei Praliaskouski) + 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 6027, Fix RemoveUnusedPrimitives without topology in search_path (Sandro Santilli) + 6028, crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires by extension are owned by extension - 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) + 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson)
----------------------------------------------------------------------- Summary of changes: doc/release_notes.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sun Feb 8 16:10:32 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 00:10:32 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.6541f160bb62d308dd0d3f480001fed1@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by robe): Replying to [comment:1 strk]: > It fails loading 3.5.1 because it was built against a newer version of GEOS which isn't found at loading time. We could make such cases a SKIP instead of a FAIL, given the focus is on testing the target (3.4 in this case) rather than the source of the downgrade (3.5.1 in this case). Or you can pass --skip-tests to fine tune which tests to skip ("downgrade 3.5.1dev--3.4.5" in this specific case) Yah I think this would be the best thing to do cause there is no way winnie and debbie could ever do this. For now I'm just going to skip the upgrade tests on debbie so I can move on. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 17:37:53 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 17:37:53 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.7-68-g5ce3fb961 Message-ID: <20260209013754.41EB416BA78@trac.osgeo.org> 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, stable-3.2 has been updated via 5ce3fb9618f5f40ba31e20c7161f77bed5e5fe0b (commit) via b1cefd1bc2e6e5b5d3d7000237b99d6dc79efe02 (commit) via e6c8937248f2740190c51993d097b1d14efe8b74 (commit) from 9c9a4ab6052b2da23dd7b8e239d14b9d7bddc1b4 (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 5ce3fb9618f5f40ba31e20c7161f77bed5e5fe0b Author: Regina Obe Date: Sun Feb 8 20:37:15 2026 -0500 NEWS update References #6043 for PostGIS 3.2.9 diff --git a/NEWS b/NEWS index 7793acada..f6eeb4cd5 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,8 @@ Proj 4.9+ required. by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + - #6043, assignment of read-only member + ?postgis_flatbuffers::span::count_ (Regina Obe) PostGIS 3.2.8 2024/12/22 commit b1cefd1bc2e6e5b5d3d7000237b99d6dc79efe02 Author: Regina Obe Date: Sun Feb 8 20:31:59 2026 -0500 FLATGEOBUF error - assignment of read-only member ?postgis_flatbuffers::span::count_? Closes #6043 for PostGIS 3.2.9 diff --git a/deps/flatgeobuf/include/flatbuffers/stl_emulation.h b/deps/flatgeobuf/include/flatbuffers/stl_emulation.h index 70e5dc944..9b93170b0 100644 --- a/deps/flatgeobuf/include/flatbuffers/stl_emulation.h +++ b/deps/flatgeobuf/include/flatbuffers/stl_emulation.h @@ -625,7 +625,7 @@ class span FLATBUFFERS_FINAL_CLASS { private: // This is a naive implementation with 'count_' member even if (Extent != dynamic_extent). pointer const data_; - const size_type count_; + size_type count_; }; #if !defined(FLATBUFFERS_SPAN_MINIMAL) commit e6c8937248f2740190c51993d097b1d14efe8b74 Author: Regina Obe Date: Sat Feb 7 15:02:28 2026 -0500 Updates to winnie's scripts diff --git a/ci/winnie/build_postgis.sh b/ci/winnie/build_postgis.sh index c5423623a..9f3d9f0cf 100644 --- a/ci/winnie/build_postgis.sh +++ b/ci/winnie/build_postgis.sh @@ -1,80 +1,6 @@ #!/usr/bin/env bash -set -e -if [[ "${OVERRIDE}" == '' ]] ; then - export GEOS_VER=3.10.0 - export GDAL_VER=3.3.3 - export PROJ_VER=7.2.1 - export SFCGAL_VER=1.4.0 - export CGAL_VER=5.3 - export ICON_VER=1.16 - export ZLIB_VER=1.2.11 - export PROTOBUF_VER=3.2.0 - export PROTOBUFC_VER=1.2.1 - export JSON_VER=0.12 - export PROJSO=libproj-19.dll -fi; -export PROTOBUF_VER=3.2.0 -export PROTOBUFC_VER=1.2.1 -export JSON_VER=0.12 -export PCRE_VER=8.33 - -if [[ "${ICON_VER}" == '' ]] ; then - export ICON_VER=1.15 -fi; - -echo "ICON_VER ${ICON_VER}" - -#set to something even if override is on but not set -if [[ "${ZLIB_VER}" == '' ]] ; then - export ZLIB_VER=1.2.11 -fi; - - -#set to something even if override is on but not set -if [[ "${LIBXML_VER}" == '' ]] ; then - export LIBXML_VER=2.7.8 -fi; - -#set to something even if override is on but not set -if [[ "${CGAL_VER}" == '' ]] ; then - export CGAL_VER=5.3 -fi; - -#export GDAL_VER=2.4.0 -#export PROJ_VER=5.2.0 - -echo "ZLIB_VER $ZLIB_VER" -echo "PROJ_VER $PROJ_VER" -echo "LIBXML_VER $LIBXML_VER" -echo "CGAL_VER $CGAL_VER" -export PROJECTS=/projects -export MINGPROJECTS=/projects -export PATHOLD=$PATH - -if [ "$OS_BUILD" == "64" ] ; then - export MINGHOST=x86_64-w64-mingw32 -else - export MINGHOST=i686-w64-mingw32 -fi; - -echo PATH AFTER: $PATH -#export PG_VER=9.2beta2 -export PGWINVER=${PG_VER}edb -export WORKSPACE=`pwd` - -echo PATH BEFORE: $PATH - -#export PGHOST=localhost -#export PGPORT=8442 -export PGUSER=postgres -#export GEOS_VER=3.4.0dev -#export GDAL_VER=1.9.1 -export PGPATH=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE} -export PGPATHEDB=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE}edb - -export POSTGIS_VER=${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION} -export POSTGIS_MICRO_VER=${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION} +. $(dirname $0)/winnie_common.sh if [ -n "$SOURCE_FOLDER" ]; then export POSTGIS_SRC=${PROJECTS}/postgis/$SOURCE_FOLDER diff --git a/ci/winnie/package_postgis.sh b/ci/winnie/package_postgis.sh index 28d8dc3e0..85c427386 100644 --- a/ci/winnie/package_postgis.sh +++ b/ci/winnie/package_postgis.sh @@ -1,88 +1,11 @@ -#### $Id: package_postgis210.sh 10291 2012-09-15 05:37:23Z robe $ +#!/usr/bin/env bash ### this script is used to zip up the compiled binaries ## PostgreSQL, OS_BUILD denote the last build to be packaged ## and are passed in by the jenkins job process -## the scp to postgis website is done using Jenkins scp plugin as a final step ### -#export OS_BUILD=64 -#export PGPORT=8442 -#POSTGIS_MAJOR_VERSION=2 -#POSTGIS_MINOR_VERSION=1 -#POSTGIS_MICRO_VERSION=0dev -#export OS_BUILD=32 -#export GCC_TYPE= -#if no override is set - use these values -#otherwise use the ones jenkins passes thru -#!/usr/bin/env bash -if [[ "${OVERRIDE}" == '' ]] ; then - export GEOS_VER=3.10.3 - export GDAL_VER=3.4.3 - export PROJ_VER=7.2.1 - export SFCGAL_VER=1.4.1 - export CGAL_VER=5.3 - export ICON_VER=1.16 - export ZLIB_VER=1.2.11 - export PROTOBUF_VER=3.2.0 - export PROTOBUFC_VER=1.2.1 - export JSON_VER=0.12 - export PROJSO=libproj-19.dll - export CURL_VER=7.73 -fi; +. $(dirname $0)/winnie_common.sh -export PROTOBUF_VER=3.2.0 -export PROTOBUFC_VER=1.2.1 -export JSON_VER=0.12 -export PCRE_VER=8.33 - -if [[ "${ICON_VER}" == '' ]] ; then - export ICON_VER=1.15 -fi; - -echo "ICON_VER ${ICON_VER}" - -if [[ "${CURL_VER}" == '' ]] ; then - export CURL_VER=7.73 -fi; - -echo "CURL_VER ${CURL_VER}" - -#set to something even if override is on but not set -if [[ "${ZLIB_VER}" == '' ]] ; then - export ZLIB_VER=1.2.11 -fi; - - -#set to something even if override is on but not set -if [[ "${LIBXML_VER}" == '' ]] ; then - export LIBXML_VER=2.9.9 -fi; - -#set to something even if override is on but not set -if [[ "${CGAL_VER}" == '' ]] ; then - export CGAL_VER=5.3 -fi; - -echo "ZLIB_VER $ZLIB_VER" -echo "PROJ_VER $PROJ_VER" -echo "LIBXML_VER $LIBXML_VER" -echo "CGAL_VER $CGAL_VER" - - -export PROJECTS=/projects -export PROJECTS=/projects -export PATHOLD=$PATH - - -export PGHOST=localhost - -export PGUSER=postgres - -export PATHOLD=$PATH -WEB=/home/www/postgis/htdocs -DWN=${WEB}/download - -export PATHOLD="/mingw/bin:/mingw/include:/c/Windows/system32:/c/Windows:.:/bin:/include:/usr/local/bin" #export PG_VER=9.2beta2 echo PATH BEFORE: $PATH diff --git a/ci/winnie/regress_postgis.sh b/ci/winnie/regress_postgis.sh index 3797d6ae7..eab14f4e2 100644 --- a/ci/winnie/regress_postgis.sh +++ b/ci/winnie/regress_postgis.sh @@ -1,76 +1,14 @@ #!/usr/bin/env bash -set -e -if [[ "${OVERRIDE}" == '' ]] ; then - export GEOS_VER=3.10.3 - export GDAL_VER=3.4.3 - export PROJ_VER=7.2.1 - export SFCGAL_VER=1.4.0 - export CGAL_VER=5.3.0 - export ICON_VER=1.15 - export ZLIB_VER=1.2.11 - export PROTOBUF_VER=3.2.0 - export PROTOBUFC_VER=1.2.1 - export JSON_VER=0.12 - export PROJSO=libproj-19.dll -fi; -export PROTOBUF_VER=3.2.0 -export PROTOBUFC_VER=1.2.1 -export JSON_VER=0.12 -export PCRE_VER=8.33 +. $(dirname $0)/winnie_common.sh -if [[ "${ICON_VER}" == '' ]] ; then - export ICON_VER=1.16 -fi; - -echo "ICON_VER ${ICON_VER}" - -#set to something even if override is on but not set -if [[ "${ZLIB_VER}" == '' ]] ; then - export ZLIB_VER=1.2.11 -fi; - - -#set to something even if override is on but not set -if [[ "${LIBXML_VER}" == '' ]] ; then - export LIBXML_VER=2.9.9 -fi; - -#set to something even if override is on but not set -if [[ "${CGAL_VER}" == '' ]] ; then - export CGAL_VER=5.3 -fi; - -echo "ZLIB_VER $ZLIB_VER" -echo "PROJ_VER $PROJ_VER" -echo "LIBXML_VER $LIBXML_VER" -echo "CGAL_VER $CGAL_VER" -echo "ZLIB_VER $ZLIB_VER" -echo "PROJ_VER $PROJ_VER" -echo "LIBXML_VER $LIBXML_VER" -export PROJECTS=/projects -export MINGPROJECTS=/projects -export PATHOLD=$PATH - - -if [ "$OS_BUILD" == "64" ] ; then - export MINGHOST=x86_64-w64-mingw32 -else - export MINGHOST=i686-w64-mingw32 -fi; +echo "MSYS2_ARG_CONV_EXCL=$MSYS2_ARG_CONV_EXCL" echo PATH AFTER: $PATH #export PG_VER=9.2beta2 export PGWINVER=${PG_VER}edb export WORKSPACE=`pwd` -echo PATH BEFORE: $PATH - -#export PGHOST=localhost -#export PGPORT=8442 -export PGUSER=postgres -#export GEOS_VER=3.4.0dev -#export GDAL_VER=1.9.1 export PGPATH=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE} export PGPATHEDB=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE}edb @@ -79,6 +17,7 @@ export POSTGIS_MICRO_VER=${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POS if [ -n "$SOURCE_FOLDER" ]; then export POSTGIS_SRC=${PROJECTS}/postgis/$SOURCE_FOLDER + cd $POSTGIS_SRC else if [[ "$POSTGIS_MICRO_VERSION" == *SVN* || "$POSTGIS_MICRO_VERSION" == *dev* ]] ; then export POSTGIS_SRC=${PROJECTS}/postgis/branches/${POSTGIS_VER} @@ -88,22 +27,16 @@ else fi; fi; +export POSTGIS_MAJOR_VERSION=`grep ^POSTGIS_MAJOR_VERSION Version.config | cut -d= -f2` +export POSTGIS_MINOR_VERSION=`grep ^POSTGIS_MINOR_VERSION Version.config | cut -d= -f2` +export POSTGIS_MICRO_VERSION=`grep ^POSTGIS_MICRO_VERSION Version.config | cut -d= -f2` +echo "Version ${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}" + #export POSTGIS_SRC=${PROJECTS}/postgis/trunk export GDAL_DATA="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/share/gdal" export RELVERDIR=postgis-pg${REL_PGVER}-binaries-${POSTGIS_MICRO_VER}w${OS_BUILD} -export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib" -export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${MINGPROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" -export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/pcre/rel-${PCRE_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:/mingw/${MINGHOST}/lib/pkgconfig" -export SHLIB_LINK="-static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm" -CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" - -#needed for proj.db to be found during cunit - for some reason on winnie it doesn't set -export PROJ_LIB=${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/share/proj - -#add protobuf -export PATH="${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" echo PATH AFTER: $PATH @@ -146,6 +79,7 @@ if [ -n "$SFCGAL_VER" ]; then #LDFLAGS="-Wl,--enable-auto-import -L${PGPATH}/lib -L${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib -L${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib" \ +CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" \ LDFLAGS="-Wl,--enable-auto-import -L${PGPATH}/lib -L${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib -L${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib" \ ./configure \ --host=${MINGHOST} --with-xml2config=${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin/xml2-config \ diff --git a/ci/winnie/winnie_common.sh b/ci/winnie/winnie_common.sh new file mode 100644 index 000000000..244ba3287 --- /dev/null +++ b/ci/winnie/winnie_common.sh @@ -0,0 +1,143 @@ +# Common code for all winnie scripts +# +# TODO: add more shared code, I guess +# + +set -e + +export PROJECTS=/projects +# Don't convert paths +# See https://trac.osgeo.org/postgis/ticket/5436#comment:5 +export MSYS2_ARG_CONV_EXCL=/config/tags + +if [[ "${OVERRIDE}" == '' ]] ; then + export GEOS_VER=3.13.1 + export GDAL_VER=3.9.2 + export PROJ_VER=8.2.1 + export SFCGAL_VER=1.5.2 + export CGAL_VER=5.6.1 + export ICON_VER=1.17 + export ZLIB_VER=1.2.13 + export PROTOBUF_VER=3.2.0 + export PROTOBUFC_VER=1.2.1 + export JSON_VER=0.12 + export PROJSO=libproj_8_2.dll + export LZ4_VER=1.9.3 +fi; + +export PROTOBUF_VER=3.2.0 +export PROTOBUFC_VER=1.2.1 +export JSON_VER=0.12 +export PCRE_VER=8.45 + + +#export OS_BUILD=64 +#export PGPORT=8442 + +#export OS_BUILD=32 + +#export GCC_TYPE= +#if no override is set - use these values +#otherwise use the ones jenkins passes thru +if [[ "${ICON_VER}" == '' ]] ; then + export ICON_VER=1.17 +fi; + +echo "ICON_VER ${ICON_VER}" + +#set to something even if override is on but not set +if [[ "${ZLIB_VER}" == '' ]] ; then + export ZLIB_VER=1.2.13 +fi; + +#set to something even if override is on but not set +if [[ "${LIBXML_VER}" == '' ]] ; then + export LIBXML_VER=2.12.5 +fi; + +#set to something even if override is on but not set +if [[ "${CGAL_VER}" == '' ]] ; then + export CGAL_VER=5.6.1 +fi; + +##hard code versions of cgal etc. for now +export CGAL_VER=5.6.1 +BOOST_VER=1.84.0 +export BOOST_VER_WU=1_84_0 + + +export LZ4_PATH=${PROJECTS}/lz4/rel-lz4-${LZ4_VER}w${OS_BUILD}${GCC_TYPE} + +export PATH="${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/boost/rel-${BOOST_VER_WU}w${OS_BUILD}${GCC_TYPE}/lib:${LZ4_PATH}/bin:${LZ4_PATH}/lib:${PATH}" +#export GDAL_VER=2.4.0 +#export PROJ_VER=5.2.0 + +echo "ZLIB_VER $ZLIB_VER" +echo "PROJ_VER $PROJ_VER" +echo "LIBXML_VER $LIBXML_VER" +echo "CGAL_VER $CGAL_VER" +export PROJECTS=/projects +export MINGPROJECTS=/projects +export PATHOLD=$PATH + +if [ "$OS_BUILD" == "64" ] ; then + export MINGHOST=x86_64-w64-mingw32 +else + export MINGHOST=i686-w64-mingw32 +fi; + +#needed for proj.db to be found during cunit - for some reason on winnie it doesn't set +if [ -d "${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/share/proj" ]; then +export PROJ_LIB=${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/share/proj +export PROJ_PATH=${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE} +else +export PROJ_LIB=${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/share/proj +export PROJ_PATH=${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE} +fi + +#export PG_VER=9.2beta2 +export PGWINVER=${PG_VER}edb +export WORKSPACE=`pwd` + +echo PATH BEFORE: $PATH + +#export PGHOST=localhost +#export PGPORT=8442 +export PGUSER=postgres +#export GEOS_VER=3.4.0dev +#export GDAL_VER=1.9.1 +export PGPATH=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE} +export PGPATHEDB=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE}edb + +export GDAL_DATA="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/share/gdal" + +export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib" +export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJ_PATH}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" +export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJ_PATH}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/pcre/rel-${PCRE_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:/mingw/${MINGHOST}/lib/pkgconfig" +export SHLIB_LINK="-static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm" +CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" + + + +#add protobuf +export PATH="${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" + +export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib" + +#add lz4 +export PATH="${LZ4_PATH}/bin:${LZ4_PATH}/lib:${PATH}" +echo $PATH + +export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" +export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/pcre/rel-${PCRE_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${LZ4_PATH}/lib/pkgconfig" +export SHLIB_LINK="-static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm" +CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" + +#add protobuf +export PATH="${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" + +echo "PATH AFTER: $PATH" + +if [[ "${INCLUDE_MINOR_LIB}" == "" ]] ; then + export INCLUDE_MINOR_LIB=1 +fi; ----------------------------------------------------------------------- Summary of changes: NEWS | 2 + ci/winnie/build_postgis.sh | 76 +---------- ci/winnie/package_postgis.sh | 81 +----------- ci/winnie/regress_postgis.sh | 84 ++---------- ci/winnie/winnie_common.sh | 143 +++++++++++++++++++++ .../flatgeobuf/include/flatbuffers/stl_emulation.h | 2 +- 6 files changed, 158 insertions(+), 230 deletions(-) create mode 100644 ci/winnie/winnie_common.sh hooks/post-receive -- PostGIS From trac at osgeo.org Sun Feb 8 17:38:01 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 01:38:01 -0000 Subject: [PostGIS] #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member =?utf-8?q?=E2=80=98postgis=5Fflatbuffers=3A=3Aspan=3CT?= =?utf-8?b?LCBFeHRlbnQ+Ojpjb3VudF/igJk=?= In-Reply-To: <046.4a022e415b86c62b7e2ba67d6e3cb029@osgeo.org> References: <046.4a022e415b86c62b7e2ba67d6e3cb029@osgeo.org> Message-ID: <061.61699ba9eb5eee845c6f6b74d285b215@osgeo.org> #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member ?postgis_flatbuffers::span::count_? ----------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: blocker | Milestone: PostGIS 3.2.9 Component: build | Version: 3.5.x Resolution: fixed | Keywords: ----------------------+--------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: assigned => closed Comment: In [changeset:"b1cefd1bc2e6e5b5d3d7000237b99d6dc79efe02/git" b1cefd1/git]: {{{#!CommitTicketReference repository="git" revision="b1cefd1bc2e6e5b5d3d7000237b99d6dc79efe02" FLATGEOBUF error - assignment of read-only member ?postgis_flatbuffers::span::count_? Closes #6043 for PostGIS 3.2.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sun Feb 8 17:38:02 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 01:38:02 -0000 Subject: [PostGIS] #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member =?utf-8?q?=E2=80=98postgis=5Fflatbuffers=3A=3Aspan=3CT?= =?utf-8?b?LCBFeHRlbnQ+Ojpjb3VudF/igJk=?= In-Reply-To: <046.4a022e415b86c62b7e2ba67d6e3cb029@osgeo.org> References: <046.4a022e415b86c62b7e2ba67d6e3cb029@osgeo.org> Message-ID: <061.2c42d013fb0eea29c07f6723da8be21e@osgeo.org> #6043: PostGIS 3.2 broken on debbie error: assignment of read-only member ?postgis_flatbuffers::span::count_? ----------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: blocker | Milestone: PostGIS 3.2.9 Component: build | Version: 3.5.x Resolution: fixed | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"5ce3fb9618f5f40ba31e20c7161f77bed5e5fe0b/git" 5ce3fb96/git]: {{{#!CommitTicketReference repository="git" revision="5ce3fb9618f5f40ba31e20c7161f77bed5e5fe0b" NEWS update References #6043 for PostGIS 3.2.9 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 17:40:56 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 17:40:56 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-171-g2290b3d Message-ID: <20260209014056.6759916BE1B@trac.osgeo.org> 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.net". The branch, website has been updated via 2290b3d3f3128f9cc52778699233f8a02f193bf0 (commit) from 48f98ae4015d69cf608393d1eb92cb644b4b13bc (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 2290b3d3f3128f9cc52778699233f8a02f193bf0 Author: Regina Obe Date: Sun Feb 8 20:40:49 2026 -0500 Mark 3.1 branch as EOL and final release 3.1.13 diff --git a/config.toml b/config.toml index a90b2c6..15dd9b0 100644 --- a/config.toml +++ b/config.toml @@ -190,8 +190,9 @@ enableRobotsTXT = true tag = "3.2.8" [params.postgis.releases.31] minor = "3.1" - dev = "3.1.13dev" - tag = "3.1.12" + dev = "3.1.13" + tag = "3.1.13" + eol = true [params.postgis.releases.30] minor = "3.0" dev = "3.0.12dev" ----------------------------------------------------------------------- Summary of changes: config.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Sun Feb 8 18:04:17 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 18:04:17 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.7-70-g1ac41a133 Message-ID: <20260209020417.856E316BACC@trac.osgeo.org> 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, stable-3.2 has been updated via 1ac41a133257973ea736a93f95c1f98df1abdbf8 (commit) via c75af9aff30278c48e8db951ef91a9ac9a335baf (commit) from 5ce3fb9618f5f40ba31e20c7161f77bed5e5fe0b (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 1ac41a133257973ea736a93f95c1f98df1abdbf8 Author: Regina Obe Date: Sun Feb 8 21:04:07 2026 -0500 Flip to 3.2.10dev milestone diff --git a/NEWS b/NEWS index 2e6120ebc..916bc0146 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +PostGIS 3.2.10dev +2026/xx/xx + +PostgreSQL 9.6-15 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. +Proj 4.9+ required. + +* Bug Fixes * + + + PostGIS 3.2.9 2026/02/08 diff --git a/Version.config b/Version.config index 52de94db6..315def4e5 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=2 -POSTGIS_MICRO_VERSION=9 +POSTGIS_MICRO_VERSION=10dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 21ac7e760..d8fcf3ac6 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -94,4 +94,5 @@ UPGRADEABLE_VERSIONS = \ 3.2.5 \ 3.2.6 \ 3.2.7 \ - 3.2.8 + 3.2.8 \ + 3.2.9 commit c75af9aff30278c48e8db951ef91a9ac9a335baf Author: Regina Obe Date: Sun Feb 8 20:59:49 2026 -0500 Update NEWS date diff --git a/NEWS b/NEWS index f6eeb4cd5..2e6120ebc 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ -PostGIS 3.2.9dev -xxxx/xx/xx +PostGIS 3.2.9 +2026/02/08 PostgreSQL 9.6-15 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. @@ -29,9 +29,7 @@ Proj 4.9+ required. - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) - - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) - - #6043, assignment of read-only member - ?postgis_flatbuffers::span::count_ (Regina Obe) + - #5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro PostGIS 3.2.8 2024/12/22 diff --git a/README.postgis b/README.postgis index 693016dd9..1346a4491 100644 --- a/README.postgis +++ b/README.postgis @@ -2,7 +2,7 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= :Version: 3.2.9 -:Date: xxxx-xx-xx +:Date: 2028-02-08 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 2969d34cb..0c5840ef0 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -4,7 +4,7 @@ Release Notes PostGIS 3.2.9 - 2026/02/07 + 2026/02/08 PostgreSQL 9.6-15 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. Bug Fixes @@ -30,6 +30,7 @@ GH-841, small memory leak in address_standardizer (Maxim Korotkov) 5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables required by extension are owned by extension authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky) 5985, Fix configure issue with Debian 12 and 13 (Regina Obe, Sandro Santilli) + 6043, assignment of read-only member postgis_flatbuffers::span<T, Extent>::count_ (Regina Obe) ----------------------------------------------------------------------- Summary of changes: NEWS | 18 +++++++++++++----- README.postgis | 2 +- Version.config | 2 +- doc/release_notes.xml | 3 ++- extensions/upgradeable_versions.mk | 3 ++- 5 files changed, 19 insertions(+), 9 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sun Feb 8 18:08:09 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 02:08:09 -0000 Subject: [PostGIS] #6010: ST_SetBandNoDataValue can't handle infinite no data In-Reply-To: <053.e75a882ed0a76b9cbe60661a303659f4@osgeo.org> References: <053.e75a882ed0a76b9cbe60661a303659f4@osgeo.org> Message-ID: <068.828bf8cad1a4ddfc1c67dd6ad11abccd@osgeo.org> #6010: ST_SetBandNoDataValue can't handle infinite no data -------------------------+------------------------------------------------- Reporter: | Owner: robe GISuser5432 | Type: defect | Status: new Priority: low | Milestone: PostGIS 3.2.10 Component: raster | Version: 3.6.x Resolution: | Keywords: ST_Polygon (raster) ; Raster; | PostGIS_Raster; -------------------------+------------------------------------------------- Changes (by robe): * milestone: PostGIS 3.6.2 => PostGIS 3.2.10 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sun Feb 8 18:21:35 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 02:21:35 -0000 Subject: [PostGIS] #6044: winnie failing make check because of docbook xml validate errors Message-ID: <046.3816776b84f15c46beba6005453ba986@osgeo.org> #6044: winnie failing make check because of docbook xml validate errors ---------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: blocker | Milestone: PostGIS 3.3.9 Component: install | Version: 3.5.x Keywords: | ---------------------+--------------------------- This is happening on versions lower than 3.5 {{{ /projects/libxml/rel-libxml2-2.9.14w64/bin/xmllint --loaddtd --path .:/projects/postgis/branches/3.4/doc --xinclude --valid postgis-out.xml --noout http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod:316: warning: failed to load external entity "http://www.oasis- open.org/docbook/xml/4.5/ent/isoamsc.ent" %ISOamsc; ^ http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod:360: warning: failed to load external entity "http://www.oasis- open.org/docbook/xml/4.5/ent/isogrk4.ent" %ISOgrk4; ^ http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod:380: warning: failed to load external entity "http://www.oasis- open.org/docbook/xml/4.5/ent/isotech.ent" %ISOtech; ^ http://www.oasis-open.org/docbook/xml/4.5/dbpoolx.mod:3794: warning: failed to load external entity "http://www.oasis- open.org/docbook/xml/4.5/htmltblx.mod" %htmltbl; ^ http://www.oasis-open.org/docbook/xml/4.5/dbpoolx.mod:3931: parser warning : PEReference: %attrs; not found "> ^ postgis-out.xml:911: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:979: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:1088: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:1186: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:155: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:194: element entry: validity error : No declaration for attribute style of element entry postgis-out.xml:328: element informaltable: validity error : No declaration for attribute border of element informaltable postgis-out.xml:357: element informaltable: validity error : No declaration for attribute border of element informaltable make[1]: *** [Makefile:577: check-xml] Error 4 make[1]: Leaving directory '/projects/postgis/branches/3.4/doc' make: *** [GNUmakefile:25: check-unit] Error 1 }}} I noticed on version 3.5, we are not passing in an xsl style sheet, so maybe that is preventing validation on 3.5 or above. I'm going to take that out of the configure on 3.4 and lower to see if that fixes the issue. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sun Feb 8 18:21:49 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 02:21:49 -0000 Subject: [PostGIS] #6044: winnie failing make check because of docbook xml validate errors In-Reply-To: <046.3816776b84f15c46beba6005453ba986@osgeo.org> References: <046.3816776b84f15c46beba6005453ba986@osgeo.org> Message-ID: <061.5a27fe509de00fa3811a35290eb73706@osgeo.org> #6044: winnie failing make check because of docbook xml validate errors ----------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: blocker | Milestone: PostGIS 3.3.9 Component: install | Version: 3.3.x Resolution: | Keywords: ----------------------+--------------------------- Changes (by robe): * version: 3.5.x => 3.3.x -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 18:32:46 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 18:32:46 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-172-g5d86101 Message-ID: <20260209023246.3646216BE49@trac.osgeo.org> 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.net". The branch, website has been updated via 5d86101dfdcd16f14cfc636c0a4fa23d7204a3f7 (commit) from 2290b3d3f3128f9cc52778699233f8a02f193bf0 (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 5d86101dfdcd16f14cfc636c0a4fa23d7204a3f7 Author: Regina Obe Date: Sun Feb 8 21:32:39 2026 -0500 Mark PostGIS 3.2.9 as released diff --git a/config.toml b/config.toml index 15dd9b0..eb97ccd 100644 --- a/config.toml +++ b/config.toml @@ -186,8 +186,8 @@ enableRobotsTXT = true tag = "3.3.8" [params.postgis.releases.32] minor = "3.2" - dev = "3.2.9dev" - tag = "3.2.8" + dev = "3.2.10dev" + tag = "3.2.9" [params.postgis.releases.31] minor = "3.1" dev = "3.1.13" ----------------------------------------------------------------------- Summary of changes: config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From trac at osgeo.org Sun Feb 8 22:09:21 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 06:09:21 -0000 Subject: [PostGIS] #6045: PostGIS 3.2 no rule to make docs-localized Message-ID: <046.d5b2a034a127f9902be4eddaa9a003fb@osgeo.org> #6045: PostGIS 3.2 no rule to make docs-localized --------------------+---------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.2.10 Component: build | Version: 3.2.x Keywords: | --------------------+---------------------------- Getting this error on woodie's doc build job {{{ /usr/bin/xsltproc --param section.autolabel 1 --param section.label.includes.component.label 1 --param chunk.section.depth 0 --param generate.section.toc.level 2 --param funcsynopsis.style kr --param admon.graphics 1 --param admon.textlabel 0 --param make.clean.html 1 --param simplesect.in.toc 0 --param use.id.as.filename 1 --param chunk.quietly 1 --param header.rule 0 --param footer.rule 0 --param table.borders.with.css 1 --stringparam chunker.output.encoding UTF-8 --stringparam chunker.output.indent no --stringparam saxon.character.representation decimal --stringparam html.stylesheet style.css --nonet \ --output html/postgis.html \ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/html/docbook.xsl \ postgis-out.xml Note: namesp. add : added namespace before processing PostGIS 3.2.10dev Manual Attributed 46627 IDs for element, cleaned up 0 make[1]: Leaving directory '/woodpecker/src/gitea.osgeo.org/postgis/postgis/doc' + make -C doc check make: Entering directory '/woodpecker/src/gitea.osgeo.org/postgis/postgis/doc' /usr/bin/xmllint --loaddtd --xinclude --valid postgis-out.xml > /dev/null make: Leaving directory '/woodpecker/src/gitea.osgeo.org/postgis/postgis/doc' + make docs-localized make: *** No rule to make target 'docs-localized'. Stop. }}} Debbie doesn't bother building localized docs for 3.2 so that is probably why her make-dist wasn't impacted by this, but woodie is checking. I question if it's even worthwhile to do this check for stable branches since we never update localized in stable branches. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sun Feb 8 22:17:56 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 22:17:56 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.0 updated. 3.0.12 Message-ID: <20260209061756.9980E16BC7F@trac.osgeo.org> 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, stable-3.0 has been updated via c47bf02e6d9e559a8653274b35fcccc557eb7a41 (commit) from 768b4c2b3c27efca4682ed68a4f8d5af9ba08377 (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 c47bf02e6d9e559a8653274b35fcccc557eb7a41 Author: Regina Obe Date: Mon Feb 9 01:16:31 2026 -0500 Update release date diff --git a/NEWS b/NEWS index 9badd3e85..e23ceaf86 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ PostGIS 3.0.12 (EOL) -2026/02/06 +2026/02/08 PostgreSQL 9.5-13 required. GEOS 3.6+ required but GEOS 3.9+ to take advantage of all features. Proj 4.9+ required. diff --git a/README.postgis b/README.postgis index 47e617674..aa25f967c 100644 --- a/README.postgis +++ b/README.postgis @@ -2,7 +2,7 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= :Version: 3.0.12 -:Date: 2026-02-06 +:Date: 2026-02-08 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 61585dfb6..f81d233cd 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -4,7 +4,7 @@ Release Notes Release 3.0.11 (EOL) - Release date: 2026/02/06 + Release date: 2026/02/08 This is a bug and security release and the final release of 3.0 series. This version requires PostgreSQL 9.5+-13 and GEOS >= 3.6+ Additional features and enhancements enabled if you are running Proj6+, PostgreSQL 12+, and GEOS 3.8 ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- README.postgis | 2 +- doc/release_notes.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Sun Feb 8 22:32:29 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 8 Feb 2026 22:32:29 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-173-g38b2915 Message-ID: <20260209063229.623E216BDC0@trac.osgeo.org> 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.net". The branch, website has been updated via 38b2915166aa61112c258b8c19ed7050d3836c48 (commit) from 5d86101dfdcd16f14cfc636c0a4fa23d7204a3f7 (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 38b2915166aa61112c258b8c19ed7050d3836c48 Author: Regina Obe Date: Mon Feb 9 01:32:21 2026 -0500 Mark 3.0.12 EOL as released diff --git a/config.toml b/config.toml index eb97ccd..82a9374 100644 --- a/config.toml +++ b/config.toml @@ -195,8 +195,9 @@ enableRobotsTXT = true eol = true [params.postgis.releases.30] minor = "3.0" - dev = "3.0.12dev" - tag = "3.0.11" + dev = "3.0.12" + tag = "3.0.12" + eol = true # [params.postgis.releases.25] # minor = "2.5" # dev = "2.5.11" ----------------------------------------------------------------------- Summary of changes: config.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Mon Feb 9 00:55:23 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 00:55:23 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-82-gd341f18aa Message-ID: <20260209085523.A813D16C198@trac.osgeo.org> 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, stable-3.4 has been updated via d341f18aa3a31f90671f8cb3f8a11f1f7bf3c188 (commit) via 85a6f86c45068db4f0458a945fca81c173d1f312 (commit) via 3bef6ba87549fe91030ca44bfc1dea09c5a14e04 (commit) via 5f2ad5e4b16c47038ba634ac0806c7ec3610322f (commit) from cd048b71de18eaaf6247f8cf6854ec2aaa2aae85 (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 d341f18aa3a31f90671f8cb3f8a11f1f7bf3c188 Author: Regina Obe Date: Mon Feb 9 03:53:28 2026 -0500 ADd check for XSLBASE and don't do check-xml unless it's set References #6044 for PostGIS 3.4.5 diff --git a/ci/winnie/regress_postgis.sh b/ci/winnie/regress_postgis.sh index 9906d5659..ddd3ff15f 100644 --- a/ci/winnie/regress_postgis.sh +++ b/ci/winnie/regress_postgis.sh @@ -79,7 +79,6 @@ LDFLAGS="-Wl,--enable-auto-import -L${PGPATH}/lib -L${LZ4_PATH}/bin -L${PROJECTS --with-pgconfig=${PGPATH}/bin/pg_config \ --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin/geos-config \ --with-libiconv=${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE} \ - --with-xsldir=${PROJECTS}/docbook/docbook-xsl-1.76.1 \ --with-gui --with-gettext=no \ --with-sfcgal=${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin/sfcgal-config \ --prefix=${PROJECTS}/postgis/liblwgeom-${POSTGIS_VER}w${OS_BUILD}${GCC_TYPE} --with-library-minor-version @@ -91,7 +90,6 @@ LDFLAGS="-Wl,--enable-auto-import -L${PGPATH}/lib -L${LZ4_PATH}/bin -L${PROJECTS --with-pgconfig=${PGPATH}/bin/pg_config \ --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin/geos-config \ --with-libiconv=${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE} \ - --with-xsldir=${PROJECTS}/docbook/docbook-xsl-1.76.1 \ --with-gui --with-gettext=no \ --with-sfcgal=${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin/sfcgal-config \ --prefix=${PROJECTS}/postgis/liblwgeom-${POSTGIS_VER}w${OS_BUILD}${GCC_TYPE} diff --git a/doc/Makefile.in b/doc/Makefile.in index b01cc88c9..4beed47ee 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,6 +1,6 @@ # # PostGIS - Spatial Types for PostgreSQL -# http://www.postgis.net +# https://postgis.net # # This is free software; you can redistribute and/or modify it under # the terms of the GNU General Public Licence. See the COPYING file. @@ -249,6 +249,7 @@ GENERATED_CHEATSHEET_FILES = $(patsubst \ VPATH = $(srcdir) .PHONY: $(XML_INPUTS_POT) +CAN_CHECK_XML = yes ifeq ($(XML2POT),) $(XML_INPUTS_POT): requirements_not_met_xml2pot else @@ -564,15 +565,24 @@ endif %_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql: xsl/postgis_gardentest.sql.xsl postgis-out.xml $(XSLTPROC) -o $@ $(XSLTPROC_PATH_OPT) $^ -check: check-unit -check-regress: - -check-unit: check-xml - ifeq ($(XMLLINT),) check-xml: requirements_not_met_xmllint check-cheatsheets: requirements_not_met_xmllint -else +CAN_CHECK_XML = no +endif + +ifeq ($(XSLBASE),) +check-xml: requirements_not_met_xmlcatalog +CAN_CHECK_XML = no +endif + +CHECK_UNIT_TARGET = + +ifeq ($(CAN_CHECK_XML),yes) +CHECK_UNIT_TARGET = check-xml +endif + + check-xml: $(XML_INPUTS) $(XMLLINT) --loaddtd $(XSLTPROC_PATH_OPT) --xinclude --valid postgis-out.xml --noout @@ -581,8 +591,11 @@ check-cheatsheets: cheatsheets $(abs_top_srcdir)/utils/check_localized_cheatsheets.sh $${f} en $(patsubst -%,%,$(DOCSUFFIX)) || exit 1; \ done -endif +check: check-unit +check-regress: + +check-unit: $(CHECK_UNIT_TARGET) requirements_not_met_xsltproc: @echo @@ -602,7 +615,7 @@ requirements_not_met_xmllint: @echo "Install xmllint and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.net/documentation" + @echo " https://postgis.net/documentation" @echo @false commit 85a6f86c45068db4f0458a945fca81c173d1f312 Author: Regina Obe Date: Mon Feb 9 02:56:13 2026 -0500 Turn off cirrus, as we have no credits left on it diff --git a/.cirrus.yml b/.cirrus.yml index c0386ff35..51e64211c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,5 +1,5 @@ task: - only_if: true + only_if: false name: FreeBSD alias: test-freebsd #env: commit 3bef6ba87549fe91030ca44bfc1dea09c5a14e04 Author: Regina Obe Date: Sun Feb 8 19:42:38 2026 -0500 Standardize winnie configs diff --git a/ci/winnie/winnie_common.sh b/ci/winnie/winnie_common.sh index 0241c6d85..efbc9f929 100644 --- a/ci/winnie/winnie_common.sh +++ b/ci/winnie/winnie_common.sh @@ -68,6 +68,9 @@ export BOOST_VER_WU=1_84_0 export LZ4_PATH=${PROJECTS}/lz4/rel-lz4-${LZ4_VER}w${OS_BUILD}${GCC_TYPE} +echo ${PATH} + +PATH="/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" export PATH="${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/boost/rel-${BOOST_VER_WU}w${OS_BUILD}${GCC_TYPE}/lib:${LZ4_PATH}/bin:${LZ4_PATH}/lib:${PATH}" #export GDAL_VER=2.4.0 @@ -79,7 +82,7 @@ echo "LIBXML_VER $LIBXML_VER" echo "CGAL_VER $CGAL_VER" export PROJECTS=/projects export MINGPROJECTS=/projects -export PATHOLD=$PATH + if [ "$OS_BUILD" == "64" ] ; then export MINGHOST=x86_64-w64-mingw32 @@ -99,6 +102,7 @@ fi #export PG_VER=9.2beta2 export PGWINVER=${PG_VER}edb export WORKSPACE=`pwd` +export XSLTPROCFLAGS=--novalid echo PATH BEFORE: $PATH @@ -112,9 +116,9 @@ export PGPATHEDB=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE}ed export GDAL_DATA="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/share/gdal" -export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib" -export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJ_PATH}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" -export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJ_PATH}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/pcre/rel-${PCRE_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:/mingw/${MINGHOST}/lib/pkgconfig" +export PATH="${PGPATH}/bin:${PGPATH}/lib:${PATH}" +export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJ_PATH}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" +export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJ_PATH}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PCRE_PATH}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:/mingw/${MINGHOST}/lib/pkgconfig" export SHLIB_LINK="-static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm" CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" @@ -123,22 +127,25 @@ CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD} #add protobuf export PATH="${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" -export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib" +export PATH="${PATH}:${PGPATH}/bin:${PGPATH}/lib" #add lz4 export PATH="${LZ4_PATH}/bin:${LZ4_PATH}/lib:${PATH}" -echo $PATH -export PATH="${PROJECTS}/xsltproc:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" -export PKG_CONFIG_PATH="${PROJECTS}/sqlite/rel-sqlite3w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/json-c/rel-${JSON_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/proj/rel-proj-${PROJ_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/pcre/rel-${PCRE_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/zlib/rel-zlib-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/pkgconfig:${LZ4_PATH}/lib/pkgconfig" export SHLIB_LINK="-static-libstdc++ -lstdc++ -Wl,-Bdynamic -lm" + CPPFLAGS="-I${PGPATH}/include -I${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/include" #add protobuf export PATH="${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PATH}" +# add pcre for address_standardizer +if [ -n "$PCRE_PATH" ]; then + export PATH="${PCRE_PATH}/include:${PCRE_PATH}/lib:${PATH}" +fi + echo "PATH AFTER: $PATH" -if [[ "${INCLUDE_MINOR_LIB}" == "" ]] ; then +if [[ "${INCLUDE_MINOR_LIB}" == '' ]] ; then export INCLUDE_MINOR_LIB=1 fi; commit 5f2ad5e4b16c47038ba634ac0806c7ec3610322f Author: Regina Obe Date: Sun Feb 8 19:11:48 2026 -0500 SKIP upgrade tests on debbie References #6042 for PostGIS 3.4.5 diff --git a/ci/debbie/postgis_regress.sh b/ci/debbie/postgis_regress.sh index f2aa5ff17..7a6dfac24 100644 --- a/ci/debbie/postgis_regress.sh +++ b/ci/debbie/postgis_regress.sh @@ -17,7 +17,7 @@ export MAKE_EXTENSION=1 export DUMP_RESTORE=0 export MAKE_LOGBT=0 export NO_SFCGAL=0 -export MAKE_UPGRADE=1 +export MAKE_UPGRADE=0 ## end variables passed in by jenkins ----------------------------------------------------------------------- Summary of changes: .cirrus.yml | 2 +- ci/debbie/postgis_regress.sh | 2 +- ci/winnie/regress_postgis.sh | 2 -- ci/winnie/winnie_common.sh | 25 ++++++++++++++++--------- doc/Makefile.in | 31 ++++++++++++++++++++++--------- 5 files changed, 40 insertions(+), 22 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 00:55:28 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 08:55:28 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.486236429c35375f0240a6c94ffc1831@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"5f2ad5e4b16c47038ba634ac0806c7ec3610322f/git" 5f2ad5e/git]: {{{#!CommitTicketReference repository="git" revision="5f2ad5e4b16c47038ba634ac0806c7ec3610322f" SKIP upgrade tests on debbie References #6042 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Mon Feb 9 00:55:28 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 08:55:28 -0000 Subject: [PostGIS] #6044: winnie failing make check because of docbook xml validate errors In-Reply-To: <046.3816776b84f15c46beba6005453ba986@osgeo.org> References: <046.3816776b84f15c46beba6005453ba986@osgeo.org> Message-ID: <061.5a3ed772fb888012744ef72838496244@osgeo.org> #6044: winnie failing make check because of docbook xml validate errors ----------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: blocker | Milestone: PostGIS 3.3.9 Component: install | Version: 3.3.x Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"d341f18aa3a31f90671f8cb3f8a11f1f7bf3c188/git" d341f18/git]: {{{#!CommitTicketReference repository="git" revision="d341f18aa3a31f90671f8cb3f8a11f1f7bf3c188" ADd check for XSLBASE and don't do check-xml unless it's set References #6044 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 02:16:07 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 02:16:07 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-83-g7796c5a55 Message-ID: <20260209101607.A611A16C585@trac.osgeo.org> 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, stable-3.4 has been updated via 7796c5a557604d7f5c692088c0addad6e5d08049 (commit) from d341f18aa3a31f90671f8cb3f8a11f1f7bf3c188 (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 7796c5a557604d7f5c692088c0addad6e5d08049 Author: Sandro Santilli Date: Wed Aug 27 12:33:09 2025 +0200 Make sure "make check" is unbuffered during upgrade checks Fixes some cases of unexpected content in log file diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh index 04471616d..db3ba0424 100755 --- a/utils/check_all_upgrades.sh +++ b/utils/check_all_upgrades.sh @@ -178,7 +178,7 @@ compatible_upgrade() check_downgrade() { RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \ - ${MAKE} -C ${REGDIR} check "TESTS=${SRCDIR}/regress/core/regress.sql" ${MAKE_ARGS} > ${TMPDIR}/log 2>&1 + unbuffer ${MAKE} -C ${REGDIR} check "TESTS=${SRCDIR}/regress/core/regress.sql" ${MAKE_ARGS} > ${TMPDIR}/log 2>&1 if test $? = 0; then echo "FAIL: ${test_label} did not error out:" tail ${TMPDIR}/log ----------------------------------------------------------------------- Summary of changes: utils/check_all_upgrades.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 02:16:59 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 02:16:59 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-84-g72c072528 Message-ID: <20260209101659.4A78B16BE16@trac.osgeo.org> 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, stable-3.4 has been updated via 72c0725280b0132bc713e08e8d59597bc776b41d (commit) from 7796c5a557604d7f5c692088c0addad6e5d08049 (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 72c0725280b0132bc713e08e8d59597bc776b41d Author: Sandro Santilli Date: Mon Feb 9 11:13:47 2026 +0100 Have debbie still check upgrades and only skip downgrade testing References #6042 for PostGIS 3.4.5 diff --git a/ci/debbie/postgis_regress.sh b/ci/debbie/postgis_regress.sh index 7a6dfac24..9370d7728 100644 --- a/ci/debbie/postgis_regress.sh +++ b/ci/debbie/postgis_regress.sh @@ -17,7 +17,8 @@ export MAKE_EXTENSION=1 export DUMP_RESTORE=0 export MAKE_LOGBT=0 export NO_SFCGAL=0 -export MAKE_UPGRADE=0 +export CHECK_UPGRADES=1 +export CHECK_DOWNGRADES=0 # also requires CHECK_UPGRADES=1 to really check downgrades ## end variables passed in by jenkins @@ -114,9 +115,13 @@ if [ "$MAKE_GARDEN" = "1" ]; then fi # Test all available upgrades -# TODO: protect via some variable ? -if [ "$MAKE_UPGRADE" = "1" ]; then +if [ "$CHECK_UPGRADES" = "1" ]; then + UPGRADE_CHECK_OPTS="" + if [ "$CHECK_DOWNGRADES" = "0" ]; then + UPGRADE_CHECK_OPTS="--skip upgrade" + fi utils/check_all_upgrades.sh \ + ${UPGRADE_CHECK_OPTS} \ `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'` if [ "$?" != "0" ]; then exit $? ----------------------------------------------------------------------- Summary of changes: ci/debbie/postgis_regress.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 02:17:00 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 10:17:00 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.ed262ddeb9aed3b65117e18ec25c0c7f@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by Sandro Santilli ): In [changeset:"72c0725280b0132bc713e08e8d59597bc776b41d/git" 72c07252/git]: {{{#!CommitTicketReference repository="git" revision="72c0725280b0132bc713e08e8d59597bc776b41d" Have debbie still check upgrades and only skip downgrade testing References #6042 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 02:58:32 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 02:58:32 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.9-1-g73a8114ba Message-ID: <20260209105832.B91A516BE1B@trac.osgeo.org> 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, stable-3.3 has been updated via 73a8114ba08b50341061489ad12607798f9f6ca8 (commit) via d7a9d926c2adbea7e14ffde14bb789c2605d9386 (commit) from aff83b101cb1838f39670502e972d71645c5786a (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 73a8114ba08b50341061489ad12607798f9f6ca8 Author: Regina Obe Date: Mon Feb 9 05:58:16 2026 -0500 Flip to milestone 3.3.10dev diff --git a/NEWS b/NEWS index ba306db19..73681eb29 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +PostGIS 3.3.10 +2026-xx-xx + PostGIS 3.3.9 2026-02-09 diff --git a/Version.config b/Version.config index 9e124976a..864c7ff22 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=3 -POSTGIS_MICRO_VERSION=9 +POSTGIS_MICRO_VERSION=10dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 1de7c484b..398a51e3f 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -104,4 +104,5 @@ UPGRADEABLE_VERSIONS = \ 3.3.5 \ 3.3.6 \ 3.3.7 \ - 3.3.8 + 3.3.8 \ + 3.3.9 commit d7a9d926c2adbea7e14ffde14bb789c2605d9386 Author: Regina Obe Date: Mon Feb 9 05:53:44 2026 -0500 Updte release notes diff --git a/NEWS b/NEWS index f57ba5eba..ba306db19 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ PostGIS 3.3.9 -2026-02-07 +2026-02-09 PostgreSQL 11-17 required. GEOS 3.6+ required but GEOS 3.11+ to take advantage of all features. Proj 4.9+ required. diff --git a/README.postgis b/README.postgis index ce24a03bf..a82ece9e8 100644 --- a/README.postgis +++ b/README.postgis @@ -2,7 +2,7 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= :Version: 3.3.9 -:Date: 2026-02-07 +:Date: 2026-02-09 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 292f6160c..f277bc322 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -4,7 +4,7 @@ Release Notes PostGIS 3.3.9 - 2026/02/07 + 2026/02/09 PostgreSQL 11-17 required. GEOS 3.6+ required but GEOS 3.11+ to take advantage of all features. Proj 4.9+ required. Bug Fixes ----------------------------------------------------------------------- Summary of changes: NEWS | 5 ++++- README.postgis | 2 +- Version.config | 2 +- doc/release_notes.xml | 2 +- extensions/upgradeable_versions.mk | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 07:19:19 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 07:19:19 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-174-g9ec8b2a Message-ID: <20260209151919.7792B16C64C@trac.osgeo.org> 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.net". The branch, website has been updated via 9ec8b2a353a227926e38dba1ab2f74566351a623 (commit) from 38b2915166aa61112c258b8c19ed7050d3836c48 (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 9ec8b2a353a227926e38dba1ab2f74566351a623 Author: Regina Obe Date: Mon Feb 9 10:19:09 2026 -0500 Mark PostGIS 3.3.9 as released diff --git a/config.toml b/config.toml index 82a9374..35aa76e 100644 --- a/config.toml +++ b/config.toml @@ -182,8 +182,8 @@ enableRobotsTXT = true tag = "3.4.4" [params.postgis.releases.33] minor = "3.3" - dev = "3.3.9dev" - tag = "3.3.8" + dev = "3.3.10dev" + tag = "3.3.9" [params.postgis.releases.32] minor = "3.2" dev = "3.2.10dev" ----------------------------------------------------------------------- Summary of changes: config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Mon Feb 9 07:48:37 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 07:48:37 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-86-g8d212bb09 Message-ID: <20260209154837.9A6CC18812B@trac.osgeo.org> 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, stable-3.4 has been updated via 8d212bb09065d137c24ab0266bec45aaa9069e4f (commit) via c779ae02a94651db71888ca251f2e0367a3cfa01 (commit) from 72c0725280b0132bc713e08e8d59597bc776b41d (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 8d212bb09065d137c24ab0266bec45aaa9069e4f Author: Regina Obe Date: Mon Feb 9 10:48:32 2026 -0500 Update release dates diff --git a/NEWS b/NEWS index caf69b355..f29c7a95c 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ PostGIS 3.4.5 -2026/02/07 +2026/02/09 PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. Proj 6.1+ required. diff --git a/README.postgis b/README.postgis index fab55b967..403c399fa 100644 --- a/README.postgis +++ b/README.postgis @@ -2,7 +2,7 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= :Version: 3.4.5 -:Date: 2026-02-07 +:Date: 2026-02-09 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/doc/release_notes.xml b/doc/release_notes.xml index b3edabeba..d35d92cff 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -4,7 +4,7 @@ Release Notes PostGIS 3.4.5 - 2025/02/07 + 2025/02/09 PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. Proj 6.1+ required. commit c779ae02a94651db71888ca251f2e0367a3cfa01 Author: Regina Obe Date: Mon Feb 9 10:46:40 2026 -0500 Downgrade turn off still seems not to be working Turning off upgrade testing completely on debbie, so can get release out References #6042 for PostGIS 3.4.5 diff --git a/ci/debbie/postgis_regress.sh b/ci/debbie/postgis_regress.sh index 9370d7728..511017796 100644 --- a/ci/debbie/postgis_regress.sh +++ b/ci/debbie/postgis_regress.sh @@ -17,7 +17,7 @@ export MAKE_EXTENSION=1 export DUMP_RESTORE=0 export MAKE_LOGBT=0 export NO_SFCGAL=0 -export CHECK_UPGRADES=1 +export CHECK_UPGRADES=0 export CHECK_DOWNGRADES=0 # also requires CHECK_UPGRADES=1 to really check downgrades ## end variables passed in by jenkins ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- README.postgis | 2 +- ci/debbie/postgis_regress.sh | 2 +- doc/release_notes.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 07:48:39 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 15:48:39 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.00ef75ab7dc200f46225fabe728f994e@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"c779ae02a94651db71888ca251f2e0367a3cfa01/git" c779ae0/git]: {{{#!CommitTicketReference repository="git" revision="c779ae02a94651db71888ca251f2e0367a3cfa01" Downgrade turn off still seems not to be working Turning off upgrade testing completely on debbie, so can get release out References #6042 for PostGIS 3.4.5 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 10:18:49 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 10:18:49 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.5-1-ga4f2599e6 Message-ID: <20260209181849.8F58E16FAB9@trac.osgeo.org> 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, stable-3.4 has been updated via a4f2599e67ec18b2882e8daad3bf0477439b6da0 (commit) from 8d212bb09065d137c24ab0266bec45aaa9069e4f (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 a4f2599e67ec18b2882e8daad3bf0477439b6da0 Author: Regina Obe Date: Mon Feb 9 13:18:31 2026 -0500 Flip to 3.4.6dev milestone diff --git a/NEWS b/NEWS index f29c7a95c..4cec23382 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +PostGIS 3.4.6dev +2026/xx/xx + +PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. +Proj 6.1+ required. + +* Bug Fixes * + PostGIS 3.4.5 2026/02/09 diff --git a/Version.config b/Version.config index 478b78f91..133fc8a31 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=4 -POSTGIS_MICRO_VERSION=5 +POSTGIS_MICRO_VERSION=6dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 860f0ee6e..3d54cdb3e 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -110,4 +110,5 @@ UPGRADEABLE_VERSIONS = \ 3.4.1 \ 3.4.2 \ 3.4.3 \ - 3.4.4 + 3.4.4 \ + 3.4.5 ----------------------------------------------------------------------- Summary of changes: NEWS | 8 ++++++++ Version.config | 2 +- extensions/upgradeable_versions.mk | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 10:24:35 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 10:24:35 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.4-25-g8f8965240 Message-ID: <20260209182435.641E016FABA@trac.osgeo.org> 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, stable-3.5 has been updated via 8f8965240f48641ccdb06a6130c1eeab82ce4dfe (commit) via d35b64dee1a1ec39fa4f78e898b96a025320bdab (commit) from ede5ab544f6214c1d95c9f58c38b38755f06cf3c (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 8f8965240f48641ccdb06a6130c1eeab82ce4dfe Author: Regina Obe Date: Mon Feb 9 13:24:25 2026 -0500 Prep for PostGIS 3.5.5 release diff --git a/NEWS b/NEWS index e4d319435..006b72059 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ PostGIS 3.5.5 -2026/02/08 +2026/02/09 To take advantage of all postgis_sfcgal extension features SFCGAL 1.5+ is needed. PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required. diff --git a/doc/release_notes.xml b/doc/release_notes.xml index 63753deb2..0c80ce8f9 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -5,7 +5,7 @@
PostGIS 3.5.5 - 2026/02/08 + 2026/02/09 This version requires PostgreSQL 12-18, GEOS 3.8 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.12+ is needed. To take advantage of all SFCGAL features, SFCGAL 1.5.0+ is needed. Bug Fixes diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index ba63176b3..a5e1a7eb6 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -96,6 +96,7 @@ UPGRADEABLE_VERSIONS = \ 3.2.6 \ 3.2.7 \ 3.2.8 \ + 3.2.9 \ 3.3.0 \ 3.3.1 \ 3.3.2 \ @@ -111,7 +112,7 @@ UPGRADEABLE_VERSIONS = \ 3.4.2 \ 3.4.3 \ 3.4.4 \ - 3.4.4 \ + 3.4.5 \ 3.5.0 \ 3.5.1 \ 3.5.2 \ commit d35b64dee1a1ec39fa4f78e898b96a025320bdab Author: Regina Obe Date: Mon Feb 9 13:21:34 2026 -0500 Turn off upgrade testing on debbie, References #6042 diff --git a/ci/debbie/postgis_regress.sh b/ci/debbie/postgis_regress.sh index f2aa5ff17..7a6dfac24 100644 --- a/ci/debbie/postgis_regress.sh +++ b/ci/debbie/postgis_regress.sh @@ -17,7 +17,7 @@ export MAKE_EXTENSION=1 export DUMP_RESTORE=0 export MAKE_LOGBT=0 export NO_SFCGAL=0 -export MAKE_UPGRADE=1 +export MAKE_UPGRADE=0 ## end variables passed in by jenkins ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- ci/debbie/postgis_regress.sh | 2 +- doc/release_notes.xml | 2 +- extensions/upgradeable_versions.mk | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 10:24:36 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 18:24:36 -0000 Subject: [PostGIS] #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded In-Reply-To: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> References: <046.adbd29e8988d4333854fefd6ed9b1668@osgeo.org> Message-ID: <061.b4fb4c4892da575d2dfc7bc263b75e8e@osgeo.org> #6042: Getting downgrade errors on debbie for PostGIS 3.4 when newer library can't be loaded ---------------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.4.5 Component: upgrade/soft | Version: 3.5.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"d35b64dee1a1ec39fa4f78e898b96a025320bdab/git" d35b64d/git]: {{{#!CommitTicketReference repository="git" revision="d35b64dee1a1ec39fa4f78e898b96a025320bdab" Turn off upgrade testing on debbie, References #6042 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Mon Feb 9 12:22:41 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 20:22:41 -0000 Subject: [PostGIS] #6046: debbie getting security error building images Message-ID: <046.44dcb2c8f5afd5b587dd84aee1f841e4@osgeo.org> #6046: debbie getting security error building images --------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.4.5 Component: build | Version: 3.5.x Keywords: | --------------------+--------------------------- I recall we had dealt with this already. i haven't checked how 3.6 is fearing. I recall in 3.6 we switched away from imagemagick with a patch that bas provided. For now I just remarked out the policy line in /etc/ImageMagick-7/policy.xml {{{ }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 12:28:16 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 12:28:16 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.5 updated. 3.5.5-1-g9e5f4cbde Message-ID: <20260209202816.8434818822A@trac.osgeo.org> 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, stable-3.5 has been updated via 9e5f4cbde747366e62bcd93a9ac30601e310fa6f (commit) from 8f8965240f48641ccdb06a6130c1eeab82ce4dfe (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 9e5f4cbde747366e62bcd93a9ac30601e310fa6f Author: Regina Obe Date: Mon Feb 9 15:27:29 2026 -0500 Push to PostGIS 3.5.6dev milestone diff --git a/NEWS b/NEWS index 006b72059..3dead9499 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +PostGIS 3.5.6dev +2026/xx/xx + +To take advantage of all postgis_sfcgal extension features SFCGAL 1.5+ is needed. +PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required. + +* Bug fixes * + PostGIS 3.5.5 2026/02/09 diff --git a/Version.config b/Version.config index 0e17c2ec3..ce3fc9869 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=5 -POSTGIS_MICRO_VERSION=5 +POSTGIS_MICRO_VERSION=6dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index a5e1a7eb6..ec284faab 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -117,4 +117,5 @@ UPGRADEABLE_VERSIONS = \ 3.5.1 \ 3.5.2 \ 3.5.3 \ - 3.5.4 + 3.5.4 \ + 3.5.5 ----------------------------------------------------------------------- Summary of changes: NEWS | 8 ++++++++ Version.config | 2 +- extensions/upgradeable_versions.mk | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 12:40:00 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 20:40:00 -0000 Subject: [PostGIS] #6047: cirrus parse error parsing "${NCPU}": invalid syntax Message-ID: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> #6047: cirrus parse error parsing "${NCPU}": invalid syntax --------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: QA/buildbots | Version: 3.4.x Keywords: | --------------------------+--------------------------- I'm not sure if it's something in cirrus that changed or we changed, but it seem branches stable-3.3 - master are broken on github because of cirrus parse error {{{ .cirrus.yml#L32 strconv.ParseInt: parsing "${NCPU}": invalid syntax }}} I had been ignoring them thinking they were errors about out of minutes. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 14:21:38 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 14:21:38 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-88-gd3c09be10 Message-ID: <20260209222138.5625A18B707@trac.osgeo.org> 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, stable-3.4 has been updated via d3c09be103a0b4438643889935cee4c7819812d7 (commit) from a4f2599e67ec18b2882e8daad3bf0477439b6da0 (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 d3c09be103a0b4438643889935cee4c7819812d7 Author: Paul Ramsey Date: Mon Feb 9 14:21:32 2026 -0800 Correctly detect MacOS and set up rpath ldflags diff --git a/configure.ac b/configure.ac index baa0f1762..f4cff95fc 100644 --- a/configure.ac +++ b/configure.ac @@ -764,6 +764,10 @@ if test ! "$POSTGIS_GEOS_VERSION" -ge 30600; then AC_MSG_ERROR([PostGIS requires GEOS >= 3.6.0]) fi +dnl Extract the linker and include flags +GEOS_LDFLAGS=`$GEOSCONFIG --clibs` +GEOS_CPPFLAGS=`$GEOSCONFIG --cflags` + # # MacOS with XCode > 15 now requires rpath entries for # libraries like GEOS/Proj that might be flexibly installed @@ -780,9 +784,6 @@ case $host_os in ;; esac -dnl Extract the linker and include flags -GEOS_LDFLAGS=`$GEOSCONFIG --clibs` -GEOS_CPPFLAGS=`$GEOSCONFIG --cflags` AC_SUBST([GEOS_LDFLAGS]) AC_SUBST([GEOS_CPPFLAGS]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 14:44:48 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 14:44:48 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-175-g0a6e32d Message-ID: <20260209224449.1D81018A686@trac.osgeo.org> 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.net". The branch, website has been updated via 0a6e32d4a32f281f6a19431051e96a112894f02f (commit) from 9ec8b2a353a227926e38dba1ab2f74566351a623 (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 0a6e32d4a32f281f6a19431051e96a112894f02f Author: Regina Obe Date: Mon Feb 9 17:44:35 2026 -0500 PostGIS 3.5.5 release diff --git a/config.toml b/config.toml index 35aa76e..cdb8856 100644 --- a/config.toml +++ b/config.toml @@ -174,8 +174,8 @@ enableRobotsTXT = true tag = "3.6.1" [params.postgis.releases.35] minor = "3.5" - dev = "3.5.5dev" - tag = "3.5.4" + dev = "3.5.6dev" + tag = "3.5.5" [params.postgis.releases.34] minor = "3.4" dev = "3.4.5dev" ----------------------------------------------------------------------- Summary of changes: config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Mon Feb 9 14:56:48 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 14:56:48 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.4-89-g45fc433e0 Message-ID: <20260209225648.71C4A18B63D@trac.osgeo.org> 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, stable-3.4 has been updated via 45fc433e06d9eed81e2cf2c1f00c852126d5c3c8 (commit) from d3c09be103a0b4438643889935cee4c7819812d7 (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 45fc433e06d9eed81e2cf2c1f00c852126d5c3c8 Author: Paul Ramsey Date: Mon Feb 9 14:55:53 2026 -0800 Set up versions for tagging diff --git a/NEWS b/NEWS index 4cec23382..f29c7a95c 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,3 @@ -PostGIS 3.4.6dev -2026/xx/xx - -PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. -Proj 6.1+ required. - -* Bug Fixes * - PostGIS 3.4.5 2026/02/09 diff --git a/Version.config b/Version.config index 133fc8a31..478b78f91 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=4 -POSTGIS_MICRO_VERSION=6dev +POSTGIS_MICRO_VERSION=5 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION ----------------------------------------------------------------------- Summary of changes: NEWS | 8 -------- Version.config | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 14:58:24 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 14:58:24 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.5-1-g6cda5480c Message-ID: <20260209225824.3F51218B63F@trac.osgeo.org> 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, stable-3.4 has been updated via 6cda5480c4687aa8ffe819f79fdf225f9af24d87 (commit) from 45fc433e06d9eed81e2cf2c1f00c852126d5c3c8 (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 6cda5480c4687aa8ffe819f79fdf225f9af24d87 Author: Paul Ramsey Date: Mon Feb 9 14:58:17 2026 -0800 Bump versions for next rev cycle diff --git a/NEWS b/NEWS index f29c7a95c..67ee2c4b1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +PostGIS 3.4.6 +2026/xx/xx + +* Bug Fixes * + + + PostGIS 3.4.5 2026/02/09 diff --git a/Version.config b/Version.config index 478b78f91..133fc8a31 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=4 -POSTGIS_MICRO_VERSION=5 +POSTGIS_MICRO_VERSION=6dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION ----------------------------------------------------------------------- Summary of changes: NEWS | 7 +++++++ Version.config | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 15:28:19 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 15:28:19 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-331-g3a860ff70 Message-ID: <20260209232820.18DE218A691@trac.osgeo.org> 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 3a860ff70a1a29f02ffbbac913e53eb1e5098bc7 (commit) from 5fac7d16ab444240d465a36d717b4f0b95c068dd (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 3a860ff70a1a29f02ffbbac913e53eb1e5098bc7 Author: Regina Obe Date: Mon Feb 9 18:26:56 2026 -0500 Remove postgis_extension_remove_objects References #5853 for PostGIS 3.7.0 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 References #6032 for PostGIS 3.7.0dev diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index d9c648683..3341f9ef1 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -14,54 +14,6 @@ -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extension install/upgrade process --------------------------- --- postgis_extension_remove_objects: This function removes objects of a particular class from an extension --- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPLACE functions whose signatures have changed and we can drop them if they are part of an extension --- So we use this to remove it from extension first before we drop -CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) - RETURNS boolean AS -$$ -DECLARE - var_sql text := ''; - var_r record; - var_result boolean := false; - var_class text := ''; - var_is_aggregate boolean := false; - var_sql_list text := ''; -BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; - var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; - - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$; - - FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate - LOOP - var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';'; - END LOOP; - IF var_sql > '' THEN - EXECUTE var_sql; - var_result := true; - END IF; - - RETURN var_result; -END; -$$ -LANGUAGE plpgsql VOLATILE; - CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) RETURNS boolean AS $$ diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql index 2fb1d1756..756dc80f8 100644 --- a/extensions/postgis_extension_helper_uninstall.sql +++ b/extensions/postgis_extension_helper_uninstall.sql @@ -13,7 +13,6 @@ -- -- This drops extension helper functions -- and should be called at the end of the extension upgrade file -DROP FUNCTION postgis_extension_remove_objects(text, text); DROP FUNCTION postgis_extension_drop_if_exists(text, text); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text); diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index c486ec0cc..e0faf1caf 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -31,6 +31,12 @@ DATA_built = \ REGRESS = test-normalize_address test-upgrade REGRESS_OPTS = --load-extension=fuzzystrmatch --load-extension=postgis --load-extension=$(EXTENSION) +EXTSCHEMA_SUPPORTED = yes + +## PostgreSQL < 16 doesn't understand new @extschema:extname@ syntax, so strip it +ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) +EXTSCHEMA_SUPPORTED = no +endif SQL_BITS = $(wildcard sql_bits/*.sql) EXTRA_CLEAN = sql expected ${SQL_BITS} @@ -51,14 +57,14 @@ expected: sql: mkdir -p $@ - -## PostgreSQL < 16 doesn't understand new @extschema:extname@ syntax, so strip it -ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) +ifeq ($(EXTSCHEMA_SUPPORTED),yes) sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql - $(PERL) -lpe "s/\@extschema:[a-z]+\@\./ /g" < $< > $@ -else - sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql cp $< $@ +else +# PG < 16 doesn't support new @extschema:@ +# so we need to strip those out +sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql + $(PERL) -lpe "s/\@extschema:[^@]+\@\./ /g" < $< > $@ endif expected/test-normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress | expected @@ -75,13 +81,13 @@ sql/test-upgrade.sql: | sql echo 'ALTER EXTENSION ${EXTENSION} UPDATE TO "ANY"; ALTER EXTENSION ${EXTENSION} UPDATE TO "$(EXTVERSION)"' > $@ ## no_relocate clause is only available in PostgreSQL 16 and above, so strip it for lower -ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) -%.control: %.control.in Makefile - $(PERL) -lpe 's/^no_relocate.*//g; s/\@EXTVERSION\@/$(EXTVERSION)/g' < "$<" > "$@" -else +ifeq ($(EXTSCHEMA_SUPPORTED),yes) %.control: %.control.in Makefile $(PERL) -lpe "s'@EXTVERSION@'$(EXTVERSION)'g" \ < "$<" > "$@" +else +%.control: %.control.in Makefile + $(PERL) -lpe 's/^no_relocate.*//g; s/\@EXTVERSION\@/$(EXTVERSION)/g' < "$<" > "$@" endif expected/test-upgrade.out: sql/test-upgrade.sql | expected @@ -98,7 +104,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_ | $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \ > $@ -sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql +sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql cat $^ > $@ echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@ cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@ @@ -205,9 +211,14 @@ sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/tiger_geocoder--unpack #aggregates are special #they can be dropped but we need to remove #them from the extension first +ifeq ($(EXTSCHEMA_SUPPORTED),yes) sql/tiger_geocoder_upgrade_minor.sql: sql/tiger_geocoder_minor.sql.in | sql - sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \ - $< > $@ + $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@ +else +sql/tiger_geocoder_upgrade_minor.sql: sql/tiger_geocoder_minor.sql.in | sql + $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g ; s/\@extschema:[^@]+\@\.//g' $< > $@ +endif + #only extension files EXTRA_CLEAN += $(wildcard expected/*--*.out) diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index c0fc12a3e..000000000 --- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE'); diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index ef3f6034c..0bc04fc56 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -42,7 +42,6 @@ DATA_built = \ EXTENSION_UPGRADE_SCRIPTS = \ extlock.sql \ ../postgis_extension_helper.sql \ - sql_bits/remove_from_extension.sql.in \ sql/topology_upgrade.sql \ sql_bits/mark_editable_objects.sql.in \ ../postgis_extension_helper_uninstall.sql diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index cc4cca819..000000000 --- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); ----------------------------------------------------------------------- Summary of changes: extensions/postgis_extension_helper.sql.in | 48 ---------------------- extensions/postgis_extension_helper_uninstall.sql | 1 - extensions/postgis_tiger_geocoder/Makefile.in | 37 +++++++++++------ .../sql_bits/remove_from_extension.sql.in | 19 --------- extensions/postgis_topology/Makefile.in | 1 - .../sql_bits/remove_from_extension.sql.in | 19 --------- 6 files changed, 24 insertions(+), 101 deletions(-) delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 15:28:21 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 23:28:21 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.3e3d2353581caa6d3f49fcbe4bfb71ff@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: new Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"3a860ff70a1a29f02ffbbac913e53eb1e5098bc7/git" 3a860ff/git]: {{{#!CommitTicketReference repository="git" revision="3a860ff70a1a29f02ffbbac913e53eb1e5098bc7" Remove postgis_extension_remove_objects References #5853 for PostGIS 3.7.0 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 References #6032 for PostGIS 3.7.0dev }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Mon Feb 9 15:28:22 2026 From: trac at osgeo.org (PostGIS) Date: Mon, 09 Feb 2026 23:28:22 -0000 Subject: [PostGIS] #6032: postgis_tiger_geocoder upgrade script for PostgreSQL < 16 not stripping extension placeholder In-Reply-To: <046.e05c3dd82af3141018edb480f4ef0486@osgeo.org> References: <046.e05c3dd82af3141018edb480f4ef0486@osgeo.org> Message-ID: <061.b9a90efd7f149a1e278fb7ba72ea7918@osgeo.org> #6032: postgis_tiger_geocoder upgrade script for PostgreSQL < 16 not stripping extension placeholder -----------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: blocker | Milestone: PostGIS 3.6.2 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"3a860ff70a1a29f02ffbbac913e53eb1e5098bc7/git" 3a860ff/git]: {{{#!CommitTicketReference repository="git" revision="3a860ff70a1a29f02ffbbac913e53eb1e5098bc7" Remove postgis_extension_remove_objects References #5853 for PostGIS 3.7.0 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 References #6032 for PostGIS 3.7.0dev }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 16:11:09 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 16:11:09 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.6 updated. 3.6.1-23-g34b1ca782 Message-ID: <20260210001110.6253918BE7B@trac.osgeo.org> 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, stable-3.6 has been updated via 34b1ca782e39d85e33d34161b6254dd206558078 (commit) via d29f1693fe8cb1e050032e495d69415636a1718a (commit) via 8fef3f68db6337af6b95b990ddd373444fe295ff (commit) from 3d64dfde01432a157f37ce3694c22d24f4d65776 (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 34b1ca782e39d85e33d34161b6254dd206558078 Author: Regina Obe Date: Mon Feb 9 19:10:45 2026 -0500 Prep for PostGIS 3.6.2 release diff --git a/NEWS b/NEWS index ee38ad634..72a5e5b9a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ -PostGIS 3.6.2dev -2026/xx/xx +PostGIS 3.6.2 +2026/02/09 This version requires PostgreSQL 12-18, GEOS 3.8 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.14+ is needed. @@ -24,6 +24,10 @@ topogeometry corruption: - #6020, schema qualify call in ST_MPointFromText (Paul Ramsey) - #6028, crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) +- #5853, Issue with topology and tiger geocoder upgrade scripts + (Regina Obe, Spencer Bryson) +- #6032, Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 + (Regina Obe) PostGIS 3.6.1 diff --git a/README.postgis b/README.postgis index bdd39454c..1a057a1af 100644 --- a/README.postgis +++ b/README.postgis @@ -1,8 +1,8 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL ================================================================= -:Version: 3.6.1 -:Date: 2025-11-13 +:Version: 3.6.2 +:Date: 2026-02-09 :Website: https://postgis.net This distribution contains a module which implements GIS simple features, ties diff --git a/Version.config b/Version.config index 351b77924..cbd77096c 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=6 -POSTGIS_MICRO_VERSION=2dev +POSTGIS_MICRO_VERSION=2 # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/doc/release_notes.xml b/doc/release_notes.xml index bf8a795de..eff6f4c45 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -2,7 +2,28 @@ Appendix Release Notes +
+ PostGIS 3.6.2 + 2026/02/09 + If you are upgrading postgis_topology and have topogeometry columns, make sure to run after the upgrade to fix topogeometry corruption: SELECT topology.FixCorruptTopoGeometryColumn(schema_name, table_name, feature_column) FROM topology.layer + + + Fixes + 6023, Fix robustness issue in ptarray_contains_point (Sandro Santilli) + 6027, Fix RemoveUnusedPrimitives without topology in search_path + (Sandro Santilli) + 6019, make clean does not remove cunit generated files + (Bas Couwenberg) + 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) + 6028, crash indexing malformed empty polygon (Paul Ramsey) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) + 5853, Issue with topology and tiger geocoder upgrade scripts + (Regina Obe, Spencer Bryson) + 6032, Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 + (Regina Obe) + +
PostGIS 3.6.1 2025/11/13 diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index 718948b71..e778dc6db 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -71,6 +71,7 @@ UPGRADEABLE_VERSIONS = \ 3.0.9 \ 3.0.10 \ 3.0.11 \ + 3.0.12 \ 3.1.0 \ 3.1.1 \ 3.1.2 \ @@ -85,6 +86,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ @@ -94,6 +96,7 @@ UPGRADEABLE_VERSIONS = \ 3.2.6 \ 3.2.7 \ 3.2.8 \ + 3.2.9 \ 3.3.0 \ 3.3.1 \ 3.3.2 \ @@ -103,15 +106,18 @@ UPGRADEABLE_VERSIONS = \ 3.3.6 \ 3.3.7 \ 3.3.8 \ + 3.3.9 \ 3.4.0 \ 3.4.1 \ 3.4.2 \ 3.4.3 \ 3.4.4 \ + 3.4.5 \ 3.5.0 \ 3.5.1 \ 3.5.2 \ 3.5.3 \ 3.5.4 \ + 3.5.5 \ 3.6.0 \ 3.6.1 commit d29f1693fe8cb1e050032e495d69415636a1718a Author: Regina Obe Date: Mon Feb 9 19:09:04 2026 -0500 FIXES TO CIRRUS CI - Get rid of $NCPU and put in a 2 instead and lower the ram. References #6047 for PostGIS 3.6.2 - Change FreeBSD to 14.3, 14.2 is no longer available diff --git a/.cirrus.yml b/.cirrus.yml index 25feb7449..b58691c4a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -53,12 +53,12 @@ task: gmake ${MAKEJOBS} check RUNTESTFLAGS="-v --extension --dumprestore" || { service postgresql onestop; exit 1; } service postgresql onestop freebsd_instance: - cpu: ${NCPU} - memory: 24G + cpu: 2 + memory: 8G matrix: - - name: 14.2-RELEASE + - name: 14.3-RELEASE freebsd_instance: - image_family: freebsd-14-2 + image_family: freebsd-14-3 task: name: macOS commit 8fef3f68db6337af6b95b990ddd373444fe295ff Author: Regina Obe Date: Mon Feb 9 18:26:56 2026 -0500 Remove postgis_extension_remove_objects Closes #5853 for PostGIS 3.6.2 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 Closes #6032 for PostGIS 3.6.2 diff --git a/extensions/postgis_extension_helper.sql.in b/extensions/postgis_extension_helper.sql.in index d5f473d16..3341f9ef1 100644 --- a/extensions/postgis_extension_helper.sql.in +++ b/extensions/postgis_extension_helper.sql.in @@ -14,73 +14,6 @@ -- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade -- The functions get uninstalled after the extension install/upgrade process --------------------------- --- postgis_extension_remove_objects: This function removes objects of a particular class from an extension --- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command --- and we can't CREATE OR REPLACE functions whose signatures have changed and we can drop them if they are part of an extension --- So we use this to remove it from extension first before we drop -CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) - RETURNS boolean AS -$$ -DECLARE - var_sql text := ''; - var_r record; - var_result boolean := false; - var_class text := ''; - var_is_aggregate boolean := false; - var_sql_list text := ''; - var_pgsql_version integer := pg_catalog.current_setting('server_version_num'); -BEGIN - var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END; - var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END; - - IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$; - ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing - var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname, - cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command - FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e - ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON - c.oid OPERATOR(pg_catalog.=) d.classid - LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid - LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid - LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid - LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid - WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a') OPERATOR(pg_catalog.=) $4;$sql$; - END IF; - - FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate - LOOP - var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';'; - END LOOP; - IF var_sql > '' THEN - EXECUTE var_sql; - var_result := true; - END IF; - - RETURN var_result; -END; -$$ -LANGUAGE plpgsql VOLATILE; - CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) RETURNS boolean AS $$ diff --git a/extensions/postgis_extension_helper_uninstall.sql b/extensions/postgis_extension_helper_uninstall.sql index 2fb1d1756..756dc80f8 100644 --- a/extensions/postgis_extension_helper_uninstall.sql +++ b/extensions/postgis_extension_helper_uninstall.sql @@ -13,7 +13,6 @@ -- -- This drops extension helper functions -- and should be called at the end of the extension upgrade file -DROP FUNCTION postgis_extension_remove_objects(text, text); DROP FUNCTION postgis_extension_drop_if_exists(text, text); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar); DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text); diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index ce3db167b..e0faf1caf 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -31,6 +31,12 @@ DATA_built = \ REGRESS = test-normalize_address test-upgrade REGRESS_OPTS = --load-extension=fuzzystrmatch --load-extension=postgis --load-extension=$(EXTENSION) +EXTSCHEMA_SUPPORTED = yes + +## PostgreSQL < 16 doesn't understand new @extschema:extname@ syntax, so strip it +ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) +EXTSCHEMA_SUPPORTED = no +endif SQL_BITS = $(wildcard sql_bits/*.sql) EXTRA_CLEAN = sql expected ${SQL_BITS} @@ -51,14 +57,14 @@ expected: sql: mkdir -p $@ - -## PostgreSQL < 16 doesn't understand new @extschema:extname@ syntax, so strip it -ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) +ifeq ($(EXTSCHEMA_SUPPORTED),yes) sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql - $(PERL) -lpe "s/\@extschema:[a-z]+\@\./ /g" < $< > $@ -else - sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql cp $< $@ +else +# PG < 16 doesn't support new @extschema:@ +# so we need to strip those out +sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql + $(PERL) -lpe "s/\@extschema:[^@]+\@\./ /g" < $< > $@ endif expected/test-normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress | expected @@ -74,14 +80,14 @@ sql/test-normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../.. sql/test-upgrade.sql: | sql echo 'ALTER EXTENSION ${EXTENSION} UPDATE TO "ANY"; ALTER EXTENSION ${EXTENSION} UPDATE TO "$(EXTVERSION)"' > $@ -## no_relocate clause is only availabe in PostgreSQL 16 and above, so strip it for lower -ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" "<" 160),1) -%.control: %.control.in Makefile - $(PERL) -lpe 's/^no_relocate.*//g; s/\@EXTVERSION\@/$(EXTVERSION)/g' < "$<" > "$@" -else +## no_relocate clause is only available in PostgreSQL 16 and above, so strip it for lower +ifeq ($(EXTSCHEMA_SUPPORTED),yes) %.control: %.control.in Makefile $(PERL) -lpe "s'@EXTVERSION@'$(EXTVERSION)'g" \ < "$<" > "$@" +else +%.control: %.control.in Makefile + $(PERL) -lpe 's/^no_relocate.*//g; s/\@EXTVERSION\@/$(EXTVERSION)/g' < "$<" > "$@" endif expected/test-upgrade.out: sql/test-upgrade.sql | expected @@ -98,7 +104,7 @@ sql/$(EXTENSION).sql: sql/$(EXTENSION)_pre.sql ../../utils/create_or_replace_to_ | $(PERL) @top_srcdir@/utils/create_or_replace_to_create.pl sql/$(EXTENSION)_pre.sql \ > $@ -sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql +sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in | sql cat $^ > $@ echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@ cat @srcdir@/../postgis_extension_helper_uninstall.sql >> $@ @@ -205,9 +211,14 @@ sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/tiger_geocoder--unpack #aggregates are special #they can be dropped but we need to remove #them from the extension first +ifeq ($(EXTSCHEMA_SUPPORTED),yes) sql/tiger_geocoder_upgrade_minor.sql: sql/tiger_geocoder_minor.sql.in | sql - sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \ - $< > $@ + $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@ +else +sql/tiger_geocoder_upgrade_minor.sql: sql/tiger_geocoder_minor.sql.in | sql + $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g ; s/\@extschema:[^@]+\@\.//g' $< > $@ +endif + #only extension files EXTRA_CLEAN += $(wildcard expected/*--*.out) diff --git a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in b/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index c0fc12a3e..000000000 --- a/extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE'); diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index ef3f6034c..0bc04fc56 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -42,7 +42,6 @@ DATA_built = \ EXTENSION_UPGRADE_SCRIPTS = \ extlock.sql \ ../postgis_extension_helper.sql \ - sql_bits/remove_from_extension.sql.in \ sql/topology_upgrade.sql \ sql_bits/mark_editable_objects.sql.in \ ../postgis_extension_helper_uninstall.sql diff --git a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in b/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in deleted file mode 100644 index cc4cca819..000000000 --- a/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in +++ /dev/null @@ -1,19 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ----- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.net --- --- Copyright (C) 2011 Regina Obe --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- Author: Regina Obe --- --- This drops extension helper functions --- and should be called at the end of the extension upgrade file --- removes all postgis_topology functions from postgis_topology extension since they will be read --- during upgrade -SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); -SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); ----------------------------------------------------------------------- Summary of changes: .cirrus.yml | 8 +-- NEWS | 8 ++- README.postgis | 4 +- Version.config | 2 +- doc/release_notes.xml | 21 +++++++ extensions/postgis_extension_helper.sql.in | 67 ---------------------- extensions/postgis_extension_helper_uninstall.sql | 1 - extensions/postgis_tiger_geocoder/Makefile.in | 39 ++++++++----- .../sql_bits/remove_from_extension.sql.in | 19 ------ extensions/postgis_topology/Makefile.in | 1 - .../sql_bits/remove_from_extension.sql.in | 19 ------ extensions/upgradeable_versions.mk | 6 ++ 12 files changed, 65 insertions(+), 130 deletions(-) delete mode 100644 extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in delete mode 100644 extensions/postgis_topology/sql_bits/remove_from_extension.sql.in hooks/post-receive -- PostGIS From trac at osgeo.org Mon Feb 9 16:11:22 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 00:11:22 -0000 Subject: [PostGIS] #5853: Bug in upgrade scripts for topology and tiger geocoder In-Reply-To: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> References: <047.6d02d3589eb19072d424c27852c1a5bc@osgeo.org> Message-ID: <062.5dde9bbb30e074174b1a0c20e9b99cc3@osgeo.org> #5853: Bug in upgrade scripts for topology and tiger geocoder ----------------------+--------------------------- Reporter: sbrys | Owner: robe Type: defect | Status: closed Priority: low | Milestone: PostGIS 3.3.9 Component: upgrade | Version: master Resolution: fixed | Keywords: ----------------------+--------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: new => closed Comment: In [changeset:"8fef3f68db6337af6b95b990ddd373444fe295ff/git" 8fef3f6/git]: {{{#!CommitTicketReference repository="git" revision="8fef3f68db6337af6b95b990ddd373444fe295ff" Remove postgis_extension_remove_objects Closes #5853 for PostGIS 3.6.2 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 Closes #6032 for PostGIS 3.6.2 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Mon Feb 9 16:11:23 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 00:11:23 -0000 Subject: [PostGIS] #6032: postgis_tiger_geocoder upgrade script for PostgreSQL < 16 not stripping extension placeholder In-Reply-To: <046.e05c3dd82af3141018edb480f4ef0486@osgeo.org> References: <046.e05c3dd82af3141018edb480f4ef0486@osgeo.org> Message-ID: <061.5f4bb9ebf6ef1276e3fc7fb9cf5d0d29@osgeo.org> #6032: postgis_tiger_geocoder upgrade script for PostgreSQL < 16 not stripping extension placeholder -----------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: blocker | Milestone: PostGIS 3.6.2 Component: tiger geocoder | Version: 3.5.x Resolution: fixed | Keywords: -----------------------------+--------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: new => closed Comment: In [changeset:"8fef3f68db6337af6b95b990ddd373444fe295ff/git" 8fef3f6/git]: {{{#!CommitTicketReference repository="git" revision="8fef3f68db6337af6b95b990ddd373444fe295ff" Remove postgis_extension_remove_objects Closes #5853 for PostGIS 3.6.2 Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 Closes #6032 for PostGIS 3.6.2 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Mon Feb 9 16:11:24 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 00:11:24 -0000 Subject: [PostGIS] #6047: cirrus parse error parsing "${NCPU}": invalid syntax In-Reply-To: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> References: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> Message-ID: <061.fa1af8df10bfc4b59f5d373c0b121183@osgeo.org> #6047: cirrus parse error parsing "${NCPU}": invalid syntax ---------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: QA/buildbots | Version: 3.4.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"d29f1693fe8cb1e050032e495d69415636a1718a/git" d29f169/git]: {{{#!CommitTicketReference repository="git" revision="d29f1693fe8cb1e050032e495d69415636a1718a" FIXES TO CIRRUS CI - Get rid of $NCPU and put in a 2 instead and lower the ram. References #6047 for PostGIS 3.6.2 - Change FreeBSD to 14.3, 14.2 is no longer available }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 9 16:12:33 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 16:12:33 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.6 updated. 3.6.1-24-g08d9b9f74 Message-ID: <20260210001233.8B17818BE7C@trac.osgeo.org> 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, stable-3.6 has been updated via 08d9b9f749fa3531591055db2a736bfb6df47006 (commit) from 34b1ca782e39d85e33d34161b6254dd206558078 (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 08d9b9f749fa3531591055db2a736bfb6df47006 Author: Regina Obe Date: Mon Feb 9 19:12:06 2026 -0500 Fix missing diff --git a/doc/release_notes.xml b/doc/release_notes.xml index eff6f4c45..f58ee5615 100644 --- a/doc/release_notes.xml +++ b/doc/release_notes.xml @@ -17,7 +17,7 @@ (Bas Couwenberg) 6020, schema qualify call in ST_MPointFromText (Paul Ramsey) 6028, crash indexing malformed empty polygon (Paul Ramsey) - GH-841, small memory leak in address_standardizer (Maxim Korotkov) + GH-841, small memory leak in address_standardizer (Maxim Korotkov) 5853, Issue with topology and tiger geocoder upgrade scripts (Regina Obe, Spencer Bryson) 6032, Fix postgis_tiger_geocoder upgrade for PostgreSQL < 16 ----------------------------------------------------------------------- Summary of changes: doc/release_notes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 16:19:50 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 16:19:50 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-176-g2f22411 Message-ID: <20260210001951.6376518C51D@trac.osgeo.org> 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.net". The branch, website has been updated via 2f224118791c1f4f0f6b5ccf71820acf70c7699d (commit) from 0a6e32d4a32f281f6a19431051e96a112894f02f (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 2f224118791c1f4f0f6b5ccf71820acf70c7699d Author: Regina Obe Date: Mon Feb 9 19:19:17 2026 -0500 PostGIS 3.4.5 release diff --git a/config.toml b/config.toml index cdb8856..c30d138 100644 --- a/config.toml +++ b/config.toml @@ -178,8 +178,8 @@ enableRobotsTXT = true tag = "3.5.5" [params.postgis.releases.34] minor = "3.4" - dev = "3.4.5dev" - tag = "3.4.4" + dev = "3.4.6dev" + tag = "3.4.5" [params.postgis.releases.33] minor = "3.3" dev = "3.3.10dev" ----------------------------------------------------------------------- Summary of changes: config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Mon Feb 9 17:17:10 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 17:17:10 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.6 updated. 3.6.2-1-g815ee4fae Message-ID: <20260210011710.5809B18C526@trac.osgeo.org> 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, stable-3.6 has been updated via 815ee4faea67d929dc80cbb1f52c81085f31064d (commit) from 08d9b9f749fa3531591055db2a736bfb6df47006 (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 815ee4faea67d929dc80cbb1f52c81085f31064d Author: Regina Obe Date: Mon Feb 9 20:16:59 2026 -0500 Push to next dev milestone diff --git a/NEWS b/NEWS index 72a5e5b9a..362a04829 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,20 @@ +PostGIS 3.6.3dev +2026/xx/xx + +This version requires PostgreSQL 12-18, GEOS 3.8 or higher, and Proj 6.1+. +To take advantage of all features, GEOS 3.14+ is needed. +To take advantage of all SFCGAL features, SFCGAL 2.2+ is needed. + +If you are upgrading postgis_topology from a version before 3.6.1 and +have topogeometry columns, make sure to run after the upgrade to fix +topogeometry corruption: + + SELECT topology.FixCorruptTopoGeometryColumn( + schema_name, table_name, feature_column + ) FROM topology.layer; + +* Fixes * + PostGIS 3.6.2 2026/02/09 diff --git a/Version.config b/Version.config index cbd77096c..7ac201024 100644 --- a/Version.config +++ b/Version.config @@ -5,7 +5,7 @@ POSTGIS_MAJOR_VERSION=3 POSTGIS_MINOR_VERSION=6 -POSTGIS_MICRO_VERSION=2 +POSTGIS_MICRO_VERSION=3dev # Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev) # when changing POSTGIS_MINOR_VERSION diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index e778dc6db..ec5a31885 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -120,4 +120,5 @@ UPGRADEABLE_VERSIONS = \ 3.5.4 \ 3.5.5 \ 3.6.0 \ - 3.6.1 + 3.6.1 \ + 3.6.2 ----------------------------------------------------------------------- Summary of changes: NEWS | 17 +++++++++++++++++ Version.config | 2 +- extensions/upgradeable_versions.mk | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Mon Feb 9 18:07:32 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 18:07:32 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-177-gf0c3944 Message-ID: <20260210020801.BDFBF18C09C@trac.osgeo.org> 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.net". The branch, website has been updated via f0c3944ff4379eb7e67922c183ee33c91a9b0f48 (commit) from 2f224118791c1f4f0f6b5ccf71820acf70c7699d (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 f0c3944ff4379eb7e67922c183ee33c91a9b0f48 Author: Regina Obe Date: Mon Feb 9 21:07:03 2026 -0500 Mark 3.6.2 as release, News on patches for 3.0-3.6 diff --git a/config.toml b/config.toml index c30d138..ddf3d51 100644 --- a/config.toml +++ b/config.toml @@ -170,8 +170,8 @@ enableRobotsTXT = true is_dev = true [params.postgis.releases.36] minor = "3.6" - dev = "3.6.2dev" - tag = "3.6.1" + dev = "3.6.3dev" + tag = "3.6.2" [params.postgis.releases.35] minor = "3.5" dev = "3.5.6dev" diff --git a/content/news/2026/02-09_postgis-patches.md b/content/news/2026/02-09_postgis-patches.md new file mode 100644 index 0000000..13481cf --- /dev/null +++ b/content/news/2026/02-09_postgis-patches.md @@ -0,0 +1,29 @@ +--- +title: PostGIS Patch Releases +layout: post +category: news +tags: [release,3.6,3.5,3.4,3.3,3.2,3.1,3.0] +author: Regina Obe +date: "2026-02-09" +thumbnail: +--- + +The PostGIS development team is pleased to provide +[bug fix releases]({{< loc "postgis.release_source">}}) for +PostGIS 3.0 - 3.6. +These are the End-Of-Life (EOL) releases for PostGIS 3.0.12 and 3.1.13. +If you haven't already upgraded from 3.0 or 3.1 series, you should do so soon. + + +* **3.6.2** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.6.2-en.pdf) +* **3.5.5** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.5.5-en.pdf) +* **3.4.5** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.4.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.4.5-en.pdf) +* **3.3.9** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.3.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.3.9.pdf) +* **3.2.9** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.2.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.2.9.pdf) +* **3.1.13 EOL** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.1.13/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.1.13.pdf) +* **3.0.12 EOL** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.0.12/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.0.12.pdf) + + + + +Please refer to the links above for more information about the issues resolved by these releases. ----------------------------------------------------------------------- Summary of changes: config.toml | 4 ++-- content/news/2026/02-09_postgis-patches.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 content/news/2026/02-09_postgis-patches.md hooks/post-receive -- postgis.net From git at osgeo.org Mon Feb 9 18:21:51 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 9 Feb 2026 18:21:51 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-178-gf747c4a Message-ID: <20260210022152.1BB6218BF76@trac.osgeo.org> 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.net". The branch, website has been updated via f747c4a217645fcda258e6d339d187db6a7138b7 (commit) from f0c3944ff4379eb7e67922c183ee33c91a9b0f48 (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 f747c4a217645fcda258e6d339d187db6a7138b7 Author: Regina Obe Date: Mon Feb 9 21:21:41 2026 -0500 Add source links diff --git a/content/news/2026/02-09_postgis-patches.md b/content/news/2026/02-09_postgis-patches.md index 13481cf..440a241 100644 --- a/content/news/2026/02-09_postgis-patches.md +++ b/content/news/2026/02-09_postgis-patches.md @@ -9,19 +9,20 @@ thumbnail: --- The PostGIS development team is pleased to provide -[bug fix releases]({{< loc "postgis.release_source">}}) for +[bug fix releases](/source) for PostGIS 3.0 - 3.6. These are the End-Of-Life (EOL) releases for PostGIS 3.0.12 and 3.1.13. If you haven't already upgraded from 3.0 or 3.1 series, you should do so soon. -* **3.6.2** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.6.2-en.pdf) -* **3.5.5** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.5.5-en.pdf) -* **3.4.5** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.4.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.4.5-en.pdf) -* **3.3.9** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.3.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.3.9.pdf) -* **3.2.9** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.2.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.2.9.pdf) -* **3.1.13 EOL** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.1.13/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.1.13.pdf) -* **3.0.12 EOL** [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.0.12/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.0.12.pdf) + +* **3.6.2** [source]({{< loc "postgis.release_source">}}/postgis-3.6.2.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.6.2.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.6.2-en.pdf) +* **3.5.5** [source]({{< loc "postgis.release_source">}}/postgis-3.5.5.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.5.5.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.5.5-en.pdf) +* **3.4.5** [source]({{< loc "postgis.release_source">}}/postgis-3.4.5.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.4.5.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.4.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.4.5-en.pdf) +* **3.3.9** [source]({{< loc "postgis.release_source">}}/postgis-3.3.9.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.3.9.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.3.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.3.9.pdf) +* **3.2.9** [source]({{< loc "postgis.release_source">}}/postgis-3.2.9.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.2.9.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.2.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.2.9.pdf) +* **3.1.13 EOL** [source]({{< loc "postgis.release_source">}}/postgis-3.1.13.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.1.213.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.1.13/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.1.13.pdf) +* **3.0.12 EOL** [source]({{< loc "postgis.release_source">}}/postgis-3.0.12.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.0.12.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.0.12/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.0.12.pdf) ----------------------------------------------------------------------- Summary of changes: content/news/2026/02-09_postgis-patches.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- postgis.net From git at osgeo.org Tue Feb 10 01:11:55 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 10 Feb 2026 01:11:55 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.5-2-ga1d6c9123 Message-ID: <20260210091155.C51AD1731C0@trac.osgeo.org> 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, stable-3.4 has been updated via a1d6c9123628f540ae3c26fc0df0554a50b1c9e2 (commit) from 6cda5480c4687aa8ffe819f79fdf225f9af24d87 (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 a1d6c9123628f540ae3c26fc0df0554a50b1c9e2 Author: Sandro Santilli Date: Tue Feb 10 10:11:38 2026 +0100 [debbie] Fix regexp to disable downgrade tests, re-enable upgrade tests diff --git a/ci/debbie/postgis_regress.sh b/ci/debbie/postgis_regress.sh index 511017796..ed4fb4133 100644 --- a/ci/debbie/postgis_regress.sh +++ b/ci/debbie/postgis_regress.sh @@ -17,7 +17,7 @@ export MAKE_EXTENSION=1 export DUMP_RESTORE=0 export MAKE_LOGBT=0 export NO_SFCGAL=0 -export CHECK_UPGRADES=0 +export CHECK_UPGRADES=1 export CHECK_DOWNGRADES=0 # also requires CHECK_UPGRADES=1 to really check downgrades ## end variables passed in by jenkins @@ -118,7 +118,7 @@ fi if [ "$CHECK_UPGRADES" = "1" ]; then UPGRADE_CHECK_OPTS="" if [ "$CHECK_DOWNGRADES" = "0" ]; then - UPGRADE_CHECK_OPTS="--skip upgrade" + UPGRADE_CHECK_OPTS="--skip downgrade" fi utils/check_all_upgrades.sh \ ${UPGRADE_CHECK_OPTS} \ ----------------------------------------------------------------------- Summary of changes: ci/debbie/postgis_regress.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Tue Feb 10 02:27:49 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 10:27:49 -0000 Subject: [PostGIS] #6047: cirrus parse error parsing "${NCPU}": invalid syntax In-Reply-To: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> References: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> Message-ID: <061.d4b17046ea4a5c8185ba5dc6a05d952c@osgeo.org> #6047: cirrus parse error parsing "${NCPU}": invalid syntax ---------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: QA/buildbots | Version: 3.4.x Resolution: | Keywords: ---------------------------+--------------------------- Comment (by robe): I thought this was giving an error in master too, but seems not to be so I'll leave the setting in master. Maybe in the other it was specified in the wrong place. Anyway I'm going to reduce the number of CPU to save on cycles, we don't need 8 to test. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Tue Feb 10 02:29:23 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 10 Feb 2026 02:29:23 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-333-gf23566c23 Message-ID: <20260210102923.BDE7A18C854@trac.osgeo.org> 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 f23566c23af71ca2d585dcee604c4856ea9d76aa (commit) via e814337ec00989b92510b60f366a4d7d82bdd518 (commit) from 3a860ff70a1a29f02ffbbac913e53eb1e5098bc7 (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 f23566c23af71ca2d585dcee604c4856ea9d76aa Author: Regina Obe Date: Tue Feb 10 05:29:15 2026 -0500 Reduce cpu and ram used on cirrus. Closes #6047 diff --git a/.cirrus.yml b/.cirrus.yml index e0d05e80b..a7dcf094f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ task: env: CIRRUS_CLONE_DEPTH: 1 CCACHE_DIR: "/tmp/ccache_dir" - NCPU: 8 + NCPU: 2 MAKEJOBS: "-j${NCPU}" CC: "ccache clang" CXX: "ccache clang++" @@ -54,7 +54,7 @@ task: service postgresql onestop freebsd_instance: cpu: ${NCPU} - memory: 24G + memory: 8G matrix: - name: 14.3-RELEASE freebsd_instance: commit e814337ec00989b92510b60f366a4d7d82bdd518 Author: Regina Obe Date: Tue Feb 10 05:24:14 2026 -0500 Add upgrade targets for recently released versions diff --git a/extensions/upgradeable_versions.mk b/extensions/upgradeable_versions.mk index c6cb58055..13476d575 100644 --- a/extensions/upgradeable_versions.mk +++ b/extensions/upgradeable_versions.mk @@ -71,6 +71,7 @@ UPGRADEABLE_VERSIONS = \ 3.0.9 \ 3.0.10 \ 3.0.11 \ + 3.0.12 \ 3.1.0 \ 3.1.1 \ 3.1.2 \ @@ -85,6 +86,7 @@ UPGRADEABLE_VERSIONS = \ 3.1.10 \ 3.1.11 \ 3.1.12 \ + 3.1.13 \ 3.2.0 \ 3.2.1 \ 3.2.2 \ @@ -94,6 +96,7 @@ UPGRADEABLE_VERSIONS = \ 3.2.6 \ 3.2.7 \ 3.2.8 \ + 3.2.9 \ 3.3.0 \ 3.3.1 \ 3.3.2 \ @@ -103,11 +106,13 @@ UPGRADEABLE_VERSIONS = \ 3.3.6 \ 3.3.7 \ 3.3.8 \ + 3.3.9 \ 3.4.0 \ 3.4.1 \ 3.4.2 \ 3.4.3 \ 3.4.4 \ + 3.4.5 \ 3.5.0 \ 3.5.1 \ 3.5.2 \ @@ -115,4 +120,5 @@ UPGRADEABLE_VERSIONS = \ 3.5.4 \ 3.6.0 \ 3.6.1 \ - 3.6.2dev + 3.6.2 \ + 3.6.3dev ----------------------------------------------------------------------- Summary of changes: .cirrus.yml | 4 ++-- extensions/upgradeable_versions.mk | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Tue Feb 10 02:29:31 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 10:29:31 -0000 Subject: [PostGIS] #6047: cirrus parse error parsing "${NCPU}": invalid syntax In-Reply-To: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> References: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> Message-ID: <061.82fce6f986a480f87549c25a71b9a9ff@osgeo.org> #6047: cirrus parse error parsing "${NCPU}": invalid syntax ---------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.7.0 Component: QA/buildbots | Version: 3.4.x Resolution: fixed | Keywords: ---------------------------+--------------------------- Changes (by Regina Obe ): * resolution: => fixed * status: new => closed Comment: In [changeset:"f23566c23af71ca2d585dcee604c4856ea9d76aa/git" f23566c/git]: {{{#!CommitTicketReference repository="git" revision="f23566c23af71ca2d585dcee604c4856ea9d76aa" Reduce cpu and ram used on cirrus. Closes #6047 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Tue Feb 10 03:36:45 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 11:36:45 -0000 Subject: [PostGIS] #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation Message-ID: <048.750ab04d7888c92a08ff4b0ad22cd50a@osgeo.org> #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation --------------------+--------------------------- Reporter: maxmli | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: raster | Version: 3.6.x Keywords: | --------------------+--------------------------- The postgis_raster extension crashes with a segmentation fault in the `rt_band_set_pixel` function when executing certain `_st_clip` operations. The crash occurs because a NULL band pointer is passed to `rt_band_set_pixel`. '''Steps to Reproduce:''' {{{#!sql CREATE EXTENSION postgis; CREATE EXTENSION postgis_raster; WITH test_rast AS ( SELECT ST_AddBand( ST_AddBand( ST_AddBand( ST_SetSRID( ST_MakeEmptyRaster(10, 10, 1, 1, 1, -1, 0, 0), 4326 ), '8BUI'::text, 1, 0 ), '8BUI'::text, 1, 0 ), '8BUI'::text, 1, 0 ) AS rast ), test_geom AS ( SELECT ST_SetSRID( ST_MakeEnvelope(1, 1, 5, 5), 4326) AS geom ) SELECT ST_Metadata(_st_clip(r.rast, ARRAY[3], g.geom, ARRAY[255, 255, 255], FALSE)) FROM test_rast r, test_geom g; }}} '''Stack Trace:''' {{{ #0 rt_band_set_pixel (band=band at entry=0x0, x=x at entry=0, y=y at entry=0, val=1, converted=converted at entry=0x0) at rt_band.c:1160 #1 0x00007f938f940b68 in RASTER_clip (fcinfo=) at rtpg_mapalgebra.c:3437 #2 0x00000000006a0553 in ExecInterpExpr (state=0xde46860, econtext=0xde46f68, isnull=0x7ffcfc9deeef) at execExprInterp.c:931 #3 0x00000000006a28d2 in ExecInterpExprStillValid (state=0xde46860, econtext=0xde46f68, isNull=0x7ffcfc9deeef) at execExprInterp.c:2311 #4 0x000000000082c007 in ExecEvalExprSwitchContext (state=0xde46860, econtext=0xde46f68, isNull=0x7ffcfc9deeef) at ../../../../src/include/executor/executor.h:440 #5 0x0000000000833498 in evaluate_expr (expr=0xde4c420, result_type=53657, result_typmod=-1, result_collation=0) at clauses.c:5014 #6 0x000000000083281e in evaluate_function (funcid=54127, result_type=53657, result_typmod=-1, result_collid=0, input_collid=0, args=0xde4b528, funcvariadic=false, func_tuple=0x7f9391781f58, context=0x7ffcfc9e0d10) at clauses.c:4521 #7 0x0000000000831d13 in simplify_function (funcid=54127, result_type=53657, result_typmod=-1, result_collid=0, input_collid=0, args_p=0x7ffcfc9df100, funcvariadic=false, process_args=true, allow_non_const=true, context=0x7ffcfc9e0d10) at clauses.c:4110 #8 0x000000000082f367 in eval_const_expressions_mutator (node=0xde43e68, context=0x7ffcfc9e0d10) at clauses.c:2595 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Tue Feb 10 03:44:19 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 11:44:19 -0000 Subject: [PostGIS] #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation In-Reply-To: <048.750ab04d7888c92a08ff4b0ad22cd50a@osgeo.org> References: <048.750ab04d7888c92a08ff4b0ad22cd50a@osgeo.org> Message-ID: <063.a03a16963d7e00b26361903aec791583@osgeo.org> #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation ---------------------+--------------------------- Reporter: maxmli | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: raster | Version: master Resolution: | Keywords: ---------------------+--------------------------- Changes (by maxmli): * version: 3.6.x => master -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Tue Feb 10 09:37:14 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 10 Feb 2026 17:37:14 -0000 Subject: [PostGIS] #2919: Include GDAL error message in raster failure messages In-Reply-To: <046.57cb7b5b0d24e5891867b5defa9cedb7@osgeo.org> References: <046.57cb7b5b0d24e5891867b5defa9cedb7@osgeo.org> Message-ID: <061.5dde98c1a0d10260a5610b2d19185668@osgeo.org> #2919: Include GDAL error message in raster failure messages --------------------------+--------------------------- Reporter: strk | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS 3.7.0 Component: raster | Version: master Resolution: fixed | Keywords: --------------------------+--------------------------- Changes (by pramsey): * resolution: => fixed * status: new => closed Comment: This is done via ogrErrorHandler -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 11 09:52:34 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 11 Feb 2026 17:52:34 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.4c0a232d6e75f8b74e1697700d3543fe@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: fixed | Keywords: -----------------------------+---------------------------- Comment (by evsi): Cool, thanks! -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 11 20:37:13 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 04:37:13 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.c6a547acb7c6d08ced42c60e5af02ddc@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: fixed | Keywords: -----------------------------+---------------------------- Changes (by tbussmann): * cc: tbussmann (added) Comment: The backported patch to the 3.2 and 3.3 branches unfortunately did break upgrades from previous versions. For `make -C postgis-3.2.9/extensions/postgis_tiger_geocoder installcheck` the `test test-upgrade` fails with: {{{ --- /Users/quickfix/Documents/_git/PostgresApp/src-14/postgis-3.2.9/extensions/postgis_tiger_geocoder/expected /test-upgrade.out 2026-02-11 02:01:47.000000000 +0100 +++ /Users/quickfix/Documents/_git/PostgresApp/src-14/postgis-3.2.9/extensions/postgis_tiger_geocoder/results /test-upgrade.out 2026-02-11 10:08:36.000000000 +0100 @@ -1 +1,5 @@ ALTER EXTENSION postgis_tiger_geocoder UPDATE TO "3.2.9next" +ERROR: schema tiger_data is not a member of extension "postgis_tiger_geocoder" +DETAIL: An extension may only use CREATE ... IF NOT EXISTS to skip object creation if the conflicting object is one that it already owns. +CONTEXT: SQL statement "CREATE SCHEMA IF NOT EXISTS tiger_data" +PL/pgSQL function inline_code_block line 3 at SQL statement }}} I also manually verified `postgis_extensions_upgrade()` does fail to update from 3.2.8 to 3.2.9 if the `postgis_tiger_geocoder` extension is installed. 3.4 and newer seem not to be affected. The `installcheck` target does not descend into sub directories, so these regression tests need to be manually started - this was closed as wontfix in #5813 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Wed Feb 11 22:48:07 2026 From: git at osgeo.org (git at osgeo.org) Date: Wed, 11 Feb 2026 22:48:07 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-334-g0b5685b2d Message-ID: <20260212064808.38178195D73@trac.osgeo.org> 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 0b5685b2dd93509b81e4f7674e7fc70f9ea7e3c8 (commit) from f23566c23af71ca2d585dcee604c4856ea9d76aa (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 0b5685b2dd93509b81e4f7674e7fc70f9ea7e3c8 Author: Teramoto Ikuhiro Date: Thu Feb 12 05:20:07 2026 +0000 Translated PostGIS Manual using Weblate (Japanese) Currently translated at 99.9% (5892 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/ja/ diff --git a/doc/po/ja/postgis-manual.po b/doc/po/ja/postgis-manual.po index 75423f7db..ede31cb10 100644 --- a/doc/po/ja/postgis-manual.po +++ b/doc/po/ja/postgis-manual.po @@ -4,13 +4,13 @@ # Teramoto Ikuhiro , 2023, 2024, 2025. # Yoichi Kayama , 2024. # Weblate , 2025. -# Teramoto Ikuhiro , 2025. +# Teramoto Ikuhiro , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2025-12-16 10:47+0000\n" +"PO-Revision-Date: 2026-02-12 06:47+0000\n" "Last-Translator: Teramoto Ikuhiro \n" "Language-Team: Japanese \n" @@ -54,10 +54,10 @@ msgid "" "corresponding ." msgstr "" "??????????????????????????????????????" -"?????????????????? POSTGIS_GDAL_ENABLED_DRIVERS?POSTGIS_ENABLE_OUTDB_RASTERS ?????????" -"???????????????????????????????????" +"?????????????????? POSTGIS_GDAL_ENABLED_DRIVERS?POSTGIS_ENABLE_OUTDB_RASTERS " +"??????????????????????????????????" +"?????????????????" #. Tag: para #, no-c-format @@ -76,7 +76,8 @@ msgstr "" msgid "" "In order to enable all GDAL drivers available in your GDAL install, set this " "environment variable as follows" -msgstr "????????GDAL???????????????????????????:" +msgstr "????????GDAL????????????????????????????" +"???????:" #. Tag: para #, no-c-format @@ -88,7 +89,7 @@ msgstr "???????????????????????? #. Tag: para #, no-c-format msgid "If you are on windows, do not quote the driver list" -msgstr "Windows????????????????????????????" +msgstr "Windows?????????????????????????????" #. Tag: para #, no-c-format ----------------------------------------------------------------------- Summary of changes: doc/po/ja/postgis-manual.po | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Wed Feb 11 23:00:03 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 07:00:03 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.ccb7b6583d582a31ad1b0231045de6ec@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Changes (by robe): * resolution: fixed => * status: closed => reopened -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 11 23:01:32 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 07:01:32 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.98d11dc34edfbf9471dd4adaf31fd7f3@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: reopened Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by robe): Replying to [comment:15 tbussmann]: > The backported patch to the 3.2 and 3.3 branches unfortunately did break upgrades from previous versions. > > For `make -C postgis-3.2.9/extensions/postgis_tiger_geocoder installcheck` the `test test-upgrade` fails with: > > > {{{ > --- /Users/quickfix/Documents/_git/PostgresApp/src-14/postgis-3.2.9/extensions/postgis_tiger_geocoder/expected /test-upgrade.out 2026-02-11 02:01:47.000000000 +0100 > +++ /Users/quickfix/Documents/_git/PostgresApp/src-14/postgis-3.2.9/extensions/postgis_tiger_geocoder/results /test-upgrade.out 2026-02-11 10:08:36.000000000 +0100 > @@ -1 +1,5 @@ > ALTER EXTENSION postgis_tiger_geocoder UPDATE TO "3.2.9next" > +ERROR: schema tiger_data is not a member of extension "postgis_tiger_geocoder" > +DETAIL: An extension may only use CREATE ... IF NOT EXISTS to skip object creation if the conflicting object is one that it already owns. > +CONTEXT: SQL statement "CREATE SCHEMA IF NOT EXISTS tiger_data" > +PL/pgSQL function inline_code_block line 3 at SQL statement > }}} > > I also manually verified `postgis_extensions_upgrade()` does fail to update from 3.2.8 to 3.2.9 if the `postgis_tiger_geocoder` extension is installed. 3.4 and newer seem not to be affected. > > The `installcheck` target does not descend into sub directories, so these regression tests need to be manually started - this was closed as wontfix in #5813 I might have missed committing my last fix to the patch on these branches. I removed the tiger_data schema from the extension cause it is supposed to be created by users. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Thu Feb 12 06:22:49 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 14:22:49 -0000 Subject: [PostGIS] #6049: postgis_tiger_geocoder should not create tiger_data Message-ID: <046.f601aa66528bf783f46b4d604662dd76@osgeo.org> #6049: postgis_tiger_geocoder should not create tiger_data ----------------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.2.10 Component: tiger geocoder | Version: 3.5.x Keywords: | ----------------------------+---------------------------- This is a patch to #5998. The tiger geocoder load process creates the tiger_data schema if it doesn't exist already so it will often not be owned by the extension creator. So there is no need to have it is part of the extension. Users can also choose to use a different name to store the data besides the default tiger_data. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Thu Feb 12 06:23:32 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 14:23:32 -0000 Subject: [PostGIS] #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension In-Reply-To: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> References: <046.5656718946f98b4130c49108ab22f1a5@osgeo.org> Message-ID: <061.85e79f9ece38a017dd150089a16bf995@osgeo.org> #5998: Ensure postgis_tiger_geocoder packaged tables are created by the extension -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: patch | Status: closed Priority: medium | Milestone: PostGIS 3.0.12 Component: tiger geocoder | Version: 3.5.x Resolution: fixed | Keywords: -----------------------------+---------------------------- Changes (by robe): * resolution: => fixed * status: reopened => closed Comment: Actually I decided to create this as a separate issue, since it is not completely related to this and only affects some of the releases. This is in #6049 -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Thu Feb 12 06:35:45 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Feb 2026 06:35:45 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.2 updated. 3.2.9-2-g9bed75f7f Message-ID: <20260212143545.7B8EB1A2AAB@trac.osgeo.org> 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, stable-3.2 has been updated via 9bed75f7f186dfa4f60039d68103a73c91a69b8e (commit) from 1ac41a133257973ea736a93f95c1f98df1abdbf8 (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 9bed75f7f186dfa4f60039d68103a73c91a69b8e Author: Regina Obe Date: Thu Feb 12 09:14:41 2026 -0500 Do not pre-create tiger_data schema during extension creation time Load process will create it if it does not exist We don't need it as part of the postgis_tiger_geocoder extension Reference #6049 for PostGIS 3.2.10 diff --git a/NEWS b/NEWS index 916bc0146..99442f6b4 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,8 @@ Proj 4.9+ required. * Bug Fixes * - + - #5998, [tiger_geododer] Do not create tiger_data as part + of postgis_tiger_geocoder extension, create/update (Regina Obe) PostGIS 3.2.9 2026/02/08 diff --git a/extras/tiger_geocoder/tiger_loader_2021.sql b/extras/tiger_geocoder/tiger_loader_2021.sql index 675bff9cd..f773dd267 100644 --- a/extras/tiger_geocoder/tiger_loader_2021.sql +++ b/extras/tiger_geocoder/tiger_loader_2021.sql @@ -242,13 +242,6 @@ BEGIN END $$ LANGUAGE 'plpgsql'; -DO -$$ -BEGIN - CREATE SCHEMA IF NOT EXISTS tiger_data; -END -$$ LANGUAGE 'plpgsql'; - DELETE FROM loader_platform WHERE os IN ('sh', 'windows'); GRANT SELECT ON TABLE loader_platform TO public; INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 ++- extras/tiger_geocoder/tiger_loader_2021.sql | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Thu Feb 12 06:38:14 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 12 Feb 2026 14:38:14 -0000 Subject: [PostGIS] #6049: postgis_tiger_geocoder should not create tiger_data In-Reply-To: <046.f601aa66528bf783f46b4d604662dd76@osgeo.org> References: <046.f601aa66528bf783f46b4d604662dd76@osgeo.org> Message-ID: <061.21a8279550a9a8c26806a2a22383db35@osgeo.org> #6049: postgis_tiger_geocoder should not create tiger_data -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.2.10 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Comment (by robe): Closed for 3.2.10 at [9bed75f7/git] -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Thu Feb 12 06:51:46 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Feb 2026 06:51:46 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.9-2-g8c0b543dc Message-ID: <20260212145146.3EA5E1A2A0C@trac.osgeo.org> 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, stable-3.3 has been updated via 8c0b543dcba0007b55e0a5fa1b3144910aa27c18 (commit) from 73a8114ba08b50341061489ad12607798f9f6ca8 (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 8c0b543dcba0007b55e0a5fa1b3144910aa27c18 Author: Regina Obe Date: Thu Feb 12 09:50:45 2026 -0500 Do not pre-create tiger_data schema during extension creation time Load process will create it if it does not exist We don't need it as part of the postgis_tiger_geocoder extension Reference #6049 for PostGIS 3.3.10 diff --git a/NEWS b/NEWS index 73681eb29..ff1eb5bf2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ PostGIS 3.3.10 2026-xx-xx +* Bug Fixes and Enhancements * + + - #5998, [tiger_geododer] Do not create tiger_data as part + of postgis_tiger_geocoder extension, create/update (Regina Obe) + PostGIS 3.3.9 2026-02-09 diff --git a/extras/tiger_geocoder/tiger_loader_2022.sql b/extras/tiger_geocoder/tiger_loader_2022.sql index 991ce2255..cf162cdd1 100644 --- a/extras/tiger_geocoder/tiger_loader_2022.sql +++ b/extras/tiger_geocoder/tiger_loader_2022.sql @@ -245,13 +245,6 @@ BEGIN END $$ LANGUAGE 'plpgsql'; -DO -$$ -BEGIN - CREATE SCHEMA IF NOT EXISTS tiger_data; -END -$$ LANGUAGE 'plpgsql'; - DELETE FROM loader_platform WHERE os IN ('sh', 'windows'); GRANT SELECT ON TABLE loader_platform TO public; INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command) ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +++++ extras/tiger_geocoder/tiger_loader_2022.sql | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Thu Feb 12 06:54:48 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Feb 2026 06:54:48 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.5-3-gbab211339 Message-ID: <20260212145448.A28BD1A2952@trac.osgeo.org> 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, stable-3.4 has been updated via bab211339ad29a8a605cf1aeae7dbd641fea87b2 (commit) from a1d6c9123628f540ae3c26fc0df0554a50b1c9e2 (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 bab211339ad29a8a605cf1aeae7dbd641fea87b2 Author: Regina Obe Date: Thu Feb 12 09:54:43 2026 -0500 Cleaup preface of NEWS so it states supported versions of PostgreSQL diff --git a/NEWS b/NEWS index 67ee2c4b1..00e232b57 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PostGIS 3.4.6 2026/xx/xx +PostgreSQL 12-17 required. GEOS 3.6+ required but GEOS 3.12+ to take advantage of all features. +Proj 6.1+ required. + * Bug Fixes * ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- PostGIS From git at osgeo.org Thu Feb 12 06:59:23 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Feb 2026 06:59:23 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-179-g3c223d1 Message-ID: <20260212145923.43FB31A24EA@trac.osgeo.org> 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.net". The branch, website has been updated via 3c223d1bfb08417cca4aefa1b8f565fc7d081237 (commit) from f747c4a217645fcda258e6d339d187db6a7138b7 (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 3c223d1bfb08417cca4aefa1b8f565fc7d081237 Author: Regina Obe Date: Thu Feb 12 09:59:13 2026 -0500 Fix news link for PostGIS 3.6.2 diff --git a/content/news/2026/02-09_postgis-patches.md b/content/news/2026/02-09_postgis-patches.md index 440a241..714d24a 100644 --- a/content/news/2026/02-09_postgis-patches.md +++ b/content/news/2026/02-09_postgis-patches.md @@ -16,7 +16,7 @@ If you haven't already upgraded from 3.0 or 3.1 series, you should do so soon. -* **3.6.2** [source]({{< loc "postgis.release_source">}}/postgis-3.6.2.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.6.2.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.6.2-en.pdf) +* **3.6.2** [source]({{< loc "postgis.release_source">}}/postgis-3.6.2.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.6.2.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.6.2/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.6.2-en.pdf) * **3.5.5** [source]({{< loc "postgis.release_source">}}/postgis-3.5.5.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.5.5.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.5.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.5.5-en.pdf) * **3.4.5** [source]({{< loc "postgis.release_source">}}/postgis-3.4.5.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.4.5.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.4.5/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.4.5-en.pdf) * **3.3.9** [source]({{< loc "postgis.release_source">}}/postgis-3.3.9.tar.gz) [md5]({{< loc "postgis.dev_download">}}/postgis-3.3.9.tar.gz.md5) [NEWS](https://git.osgeo.org/postgis/postgis/raw/tag/3.3.9/NEWS) docs: [en]({{< loc "postgis.release_docs">}}/postgis-3.3.9.pdf) ----------------------------------------------------------------------- Summary of changes: content/news/2026/02-09_postgis-patches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- postgis.net From git at osgeo.org Thu Feb 12 11:42:13 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Feb 2026 11:42:13 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.3 updated. 3.3.9-3-g1ff46f649 Message-ID: <20260212194214.0464B1A3033@trac.osgeo.org> 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, stable-3.3 has been updated via 1ff46f6490e1ffb1506d9f6bf84188b9179282e7 (commit) from 8c0b543dcba0007b55e0a5fa1b3144910aa27c18 (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 1ff46f6490e1ffb1506d9f6bf84188b9179282e7 Author: Paul Ramsey Date: Thu Feb 12 11:42:03 2026 -0800 Remove duplicate check of xnode==NULL diff --git a/postgis/lwgeom_in_gml.c b/postgis/lwgeom_in_gml.c index 7ce6c76d2..32a86d285 100644 --- a/postgis/lwgeom_in_gml.c +++ b/postgis/lwgeom_in_gml.c @@ -1704,8 +1704,6 @@ static LWGEOM* parse_gml_mline(xmlNodePtr xnode, bool *hasz, int *root_srid) if (is_xlink(xnode)) xnode = get_xlink_node(xnode); if (xnode == NULL) gml_lwpgerror("invalid GML representation", 30); - if (xnode == NULL) - gml_lwpgerror("invalid GML representation", 30); parse_gml_srs(xnode, &srs); if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) ----------------------------------------------------------------------- Summary of changes: postgis/lwgeom_in_gml.c | 2 -- 1 file changed, 2 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 13 09:13:48 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 13 Feb 2026 17:13:48 -0000 Subject: [PostGIS] #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation In-Reply-To: <048.750ab04d7888c92a08ff4b0ad22cd50a@osgeo.org> References: <048.750ab04d7888c92a08ff4b0ad22cd50a@osgeo.org> Message-ID: <063.2912c0172768014e9df35b0136c28ae1@osgeo.org> #6048: postgis_raster crashes in rt_band_set_pixel due to NULL band pointer during ST_Clip operation ---------------------+--------------------------- Reporter: maxmli | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: raster | Version: master Resolution: | Keywords: ---------------------+--------------------------- Comment (by pramsey): Confirmed this replicates for me locally. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 14 15:43:11 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 14 Feb 2026 23:43:11 -0000 Subject: [PostGIS] #6050: Upgrade woodie-server from 3.7 from 3.13.0 Message-ID: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> #6050: Upgrade woodie-server from 3.7 from 3.13.0 --------------------------+-------------------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: Website Management, Bots Component: QA/buildbots | Version: master Keywords: | --------------------------+-------------------------------------- Woodie is very behind on patch updates. Will do shortly but will disable all the agents first and bring them up one by one. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 14 16:22:43 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Feb 2026 00:22:43 -0000 Subject: [PostGIS] #6050: Upgrade woodie-server from 3.7 from 3.13.0 In-Reply-To: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> References: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> Message-ID: <061.831565f91491d64c9136edebc7ac6ff0@osgeo.org> #6050: Upgrade woodie-server from 3.7 from 3.13.0 ---------------------------+-------------------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: Website Management, Bots Component: QA/buildbots | Version: master Resolution: | Keywords: ---------------------------+-------------------------------------- Changes (by robe): * Attachment "woodie-queue.png" added. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 14 16:23:11 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Feb 2026 00:23:11 -0000 Subject: [PostGIS] #6050: Upgrade woodie-server from 3.7 from 3.13.0 In-Reply-To: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> References: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> Message-ID: <061.6c198ea776dab80ed5b7c48fd2448148@osgeo.org> #6050: Upgrade woodie-server from 3.7 from 3.13.0 ---------------------------+-------------------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: Website Management, Bots Component: QA/buildbots | Version: master Resolution: | Keywords: ---------------------------+-------------------------------------- Comment (by robe): Done this is much better. They have now on the Queue screen it has the name of the agent running and if you click you can see the job it is working on. This will make it easier to determine unhealthy agents. [[Image(woodie-queue.png)]] -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Sat Feb 14 16:24:09 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Feb 2026 00:24:09 -0000 Subject: [PostGIS] #6050: Upgrade woodie-server from 3.7 from 3.13.0 In-Reply-To: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> References: <046.66dc6c10e8739819e8868312338c2dbd@osgeo.org> Message-ID: <061.df702762c6143850bff5ea1b90709819@osgeo.org> #6050: Upgrade woodie-server from 3.7 from 3.13.0 ---------------------------+-------------------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: medium | Milestone: Website Management, Bots Component: QA/buildbots | Version: master Resolution: fixed | Keywords: ---------------------------+-------------------------------------- Changes (by robe): * resolution: => fixed * status: new => closed -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Sat Feb 14 17:10:56 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 14 Feb 2026 17:10:56 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.4 updated. 3.4.5-4-g86e45c71c Message-ID: <20260215011056.7050924BC9@trac.osgeo.org> 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, stable-3.4 has been updated via 86e45c71c55b00b62c64a51d081ffff0a896222c (commit) from bab211339ad29a8a605cf1aeae7dbd641fea87b2 (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 86e45c71c55b00b62c64a51d081ffff0a896222c Author: Regina Obe Date: Sat Feb 14 20:09:27 2026 -0500 CIRRUS config changes - Get rid of variable ${NCPU} and replace with 4 to fix parse error - Change freebsd to 14-3 as 14.2 is no longer available Closes #6047 for PostGIS 3.4 diff --git a/.cirrus.yml b/.cirrus.yml index 51e64211c..42dd269fb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,9 +29,9 @@ task: - service postgresql onestop freebsd_instance: - cpu: ${NCPU} - memory: 24G + cpu: 4 + memory: 16G matrix: - - name: 14.2-RELEASE + - name: 14.3-RELEASE freebsd_instance: - image_family: freebsd-14-2 + image_family: freebsd-14-3 ----------------------------------------------------------------------- Summary of changes: .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Feb 14 17:11:04 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Feb 2026 01:11:04 -0000 Subject: [PostGIS] #6047: cirrus parse error parsing "${NCPU}": invalid syntax In-Reply-To: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> References: <046.d7430dae61788ea870b476368b64d64c@osgeo.org> Message-ID: <061.78232463aad31ffb414336a4a58a1deb@osgeo.org> #6047: cirrus parse error parsing "${NCPU}": invalid syntax ---------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.7.0 Component: QA/buildbots | Version: 3.4.x Resolution: fixed | Keywords: ---------------------------+--------------------------- Comment (by Regina Obe ): In [changeset:"86e45c71c55b00b62c64a51d081ffff0a896222c/git" 86e45c71/git]: {{{#!CommitTicketReference repository="git" revision="86e45c71c55b00b62c64a51d081ffff0a896222c" CIRRUS config changes - Get rid of variable ${NCPU} and replace with 4 to fix parse error - Change freebsd to 14-3 as 14.2 is no longer available Closes #6047 for PostGIS 3.4 }}} -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Mon Feb 16 22:53:03 2026 From: git at osgeo.org (git at osgeo.org) Date: Mon, 16 Feb 2026 22:53:03 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-338-gc154d2f6f Message-ID: <20260217065307.7DBF137C99@trac.osgeo.org> 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 c154d2f6ff21d92044dbe32237e53961950c62e8 (commit) via c218747b14e642efcbe6e05722d30e2c834494f4 (commit) via 131398cb4b32da925283615ad7798f69ee44904c (commit) via 256d02fa782f7d55240fc49fdf0d1305dd5dabda (commit) from 0b5685b2dd93509b81e4f7674e7fc70f9ea7e3c8 (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 c154d2f6ff21d92044dbe32237e53961950c62e8 Author: Lo?c Bartoletti Date: Tue Feb 17 07:52:28 2026 +0100 chore(news): fix CG_AlphaShape diff --git a/NEWS b/NEWS index fbde38635..702d22393 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ xxxx/xx/xx - #5593, Docs: render manual images with GraphicsMagick without temporary files, enabling parallel builds, keeping ImageMagick fallbacks working, and documenting the generator workflow for contributors (Darafei Praliaskouski) + - GH-848, CG_AlphaShape now returns a MultiPolygon (Jean Felder) PostGIS 3.6.0 2025/09/01 commit c218747b14e642efcbe6e05722d30e2c834494f4 Author: Jean Felder Date: Thu Feb 12 11:31:38 2026 +0100 sfcgal/tests: Add a unit test for alpha shapes with 2 components Those tests are only enabled witch SFCGAL 2.3 because the multi-components case was broken before this version. diff --git a/sfcgal/regress/alphashape_components.sql b/sfcgal/regress/alphashape_components.sql new file mode 100644 index 000000000..38e896ffd --- /dev/null +++ b/sfcgal/regress/alphashape_components.sql @@ -0,0 +1,4 @@ +SELECT 'CG_Optimalalphashape_2components', + ST_AsText(CG_OptimalAlphaShape('MULTIPOINT((10.1 0.2),(8.1 0.1),(6.0 0.0),(4.2 0.3),(2.5 1.0),(1.2 2.3),(0.4 4.0),(0.1 6.1),(0.3 8.2),(1.1 10.1),(2.6 11.2),(4.1 11.9),(6.2 12.1),(8.3 11.8),(10.2 11.1),(9.1 9.9),(7.6 9.8),(6.1 9.9),(4.8 9.2),(3.8 8.0),(3.6 6.2),(3.7 4.1),(4.6 2.9),(6.0 2.3),(7.8 2.2),(9.2 2.4),(40.3 0.4),(40.1 3.1),(39.8 6.2),(40.4 9.0),(40.2 12.3),(40.5 15.2),(41.9 15.6),(43.1 15.3),(54.3 15.2),(55.8 15.0),(55.6 12.1),(55.9 9.2),(55.5 6.0),(55.7 3.3),(55.4 0.5),(52.6 0.1),(49.8 -0.2),(46.9 2.8),(44.2 0.2),(42.1 0.3),(43.0 3.8),(43.3 7.1),(43.1 10.4),(52.9 10.6),(52.7 7.3),(52.8 4.1))', allow_holes => false, nb_components => 2)); +SELECT 'CG_OptimalAlphaShape_hole_2components', + ST_AsText(CG_OptimalAlphaShape('MULTIPOINT((0 0),(0 1),(0 2),(0 3),(0 4),(0 5),(0 6),(0 7),(0 8),(0 9),(1 10),(2 10),(3 10),(4 10),(4.5 9.5),(5 9),(5.5 8.5),(6 8),(6 7),(6 6),(5.5 5.5),(5 5),(4 5),(3 5),(2 5),(1 5),(1 4),(2 4),(3 4),(4 4),(4.5 3.5),(5 3),(6 2),(6 1),(5.5 0.5),(5 0),(4 0),(3 0),(2 0),(1 0),(0.5 0),(0.5 1),(0.5 2),(0.5 3),(0.5 4),(0.5 5),(0.5 6),(0.5 7),(0.5 8),(0.5 9),(0.5 10),(1 9.5),(2 9.5),(3 9.5),(4 9.5),(4.5 9),(5 8.5),(5.5 8),(5.5 7),(5.5 6),(5.5 6.5),(5 5.5),(4 5.5),(3 5.5),(2 5.5),(1 5.5),(1.5 4.5),(2.5 4.5),(3.5 4.5),(4 4.5),(4.5 4),(5 3.5),(5.5 3),(5.5 2),(5.5 1),(5 0.5),(4 0.5),(3 0.5),(2 0.5),(1 0.5),(12 0),(12 1),(12 2),(12 3),(12 4),(12 5),(12 6),(12 7),(12 8),(12 9),(12 10),(13 10),(14 10),(15 10),(16 10),(16.5 9.5),(17 9),(17.5 8.5),(18 8),(18 7),(18 6),(17.5 5.5),(17 5),(16 5),(15 5),(14 5),(13 5),(12.5 0),(12.5 1),(12.5 2),(12.5 3),(12.5 4),(12.5 5),(12.5 6),(12.5 7),(12.5 8),(12.5 9),(12.5 10),(13 9.5),(14 9.5),(15 9.5),(16 9.5),(16.5 9),(17 8.5),(17.5 8),(17.5 7),(17.5 6),(17.5 6.5),(17 5.5),(16 5.5),(15 5.5),(14 5.5),(13 5.5),(13 1),(13 2),(13 3),(13 4),(17.5 7.4),(18 7.3),(5.1 2.5),(5.8 2.5),(0.03 9.82),(0.23 10))', allow_holes => true, nb_components => 2)); diff --git a/sfcgal/regress/alphashape_components_expected b/sfcgal/regress/alphashape_components_expected new file mode 100644 index 000000000..a30a4ad59 --- /dev/null +++ b/sfcgal/regress/alphashape_components_expected @@ -0,0 +1,2 @@ +CG_Optimalalphashape_2components|MULTIPOLYGON(((8.3 11.8,6.2 12.1,4.1 11.9,2.6 11.2,1.1 10.1,0.3 8.2,0.1 6.1,0.4 4,1.2 2.3,2.5 1,4.2 0.3,6 0,8.1 0.1,10.1 0.2,9.2 2.4,7.8 2.2,6 2.3,3.6 6.2,7.6 9.8,9.1 9.9,10.2 11.1,8.3 11.8)),((55.6 12.1,55.8 15,54.3 15.2,52.9 10.6,52.7 7.3,52.8 4.1,46.9 2.8,43.3 7.1,43.1 10.4,43.1 15.3,41.9 15.6,40.5 15.2,40.2 12.3,40.4 9,39.8 6.2,40.1 3.1,40.3 0.4,42.1 0.3,44.2 0.2,49.8 -0.2,52.6 0.1,55.4 0.5,55.7 3.3,55.5 6,55.9 9.2,55.6 12.1))) +CG_OptimalAlphaShape_hole_2components|MULTIPOLYGON(((5.5 8.5,5 9,4.5 9.5,4 10,3 10,2 10,1 10,0.5 10,0.23 10,0.03 9.82,0 9,0 8,0 7,0 6,0 5,0 4,0 3,0 2,0 1,0 0,0.5 0,1 0,2 0,3 0,4 0,5 0,5.5 0.5,6 1,6 2,5.8 2.5,5.5 3,5 3.5,4.5 4,4 4.5,5 5,5.5 5.5,6 6,6 7,6 8,5.5 8.5),(0.5 2,0.5 3,1 4,2 4,3 4,4 4,4.5 3.5,5 3,5.1 2.5,5.5 2,5.5 1,5 0.5,4 0.5,3 0.5,2 0.5,1 0.5,0.5 1,0.5 2),(0.5 7,0.5 8,0.5 9,1 9.5,2 9.5,3 9.5,4 9.5,4.5 9,5 8.5,5.5 8,5.5 7,5.5 6.5,5.5 6,5 5.5,4 5.5,3 5.5,2 5.5,1 5.5,0.5 6,0.5 7)),((17.5 8.5,17 9,16.5 9.5,16 10,15 10,14 10,13 10,12.5 10,12 10,12 9,12 8,12 7,12 6,12 5,12 4,12 3,12 2,12 1,12 0,12.5 0,13 1,13 2,13 3,13 4,13 5,14 5,15 5,16 5,17 5,17.5 5.5,18 6,18 7,18 7.3,18 8,17.5 8.5),(12.5 7,12.5 8,12.5 9,13 9.5,14 9.5,15 9.5,16 9.5,16.5 9,17 8.5,17.5 8,17.5 7.4,17.5 7,17.5 6.5,17.5 6,17 5.5,16 5.5,15 5.5,14 5.5,13 5.5,12.5 6,12.5 7))) diff --git a/sfcgal/regress/tests.mk.in b/sfcgal/regress/tests.mk.in index 7089bada9..557edcd2f 100644 --- a/sfcgal/regress/tests.mk.in +++ b/sfcgal/regress/tests.mk.in @@ -43,3 +43,7 @@ ifeq ($(shell expr "$(POSTGIS_SFCGAL_VERSION)" ">=" 20100),1) $(top_srcdir)/sfcgal/regress/simplify.sql \ $(top_srcdir)/sfcgal/regress/alphawrapping.sql endif +ifeq ($(shell expr "$(POSTGIS_SFCGAL_VERSION)" ">=" 20300),1) + TESTS += \ + $(top_srcdir)/sfcgal/regress/alphashape_components.sql +endif commit 131398cb4b32da925283615ad7798f69ee44904c Author: Jean Felder Date: Tue Feb 3 10:52:37 2026 +0100 sfcgal/doc: alphashape now returns a multipolygon instead of polygon This way, it is able to properly handle the multi components case. If the output has only one component a multipolygon with only one polygon is returned. diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml index 3ac598b64..e3abfbac0 100644 --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@ -1607,10 +1607,7 @@ ST_GeomFromText('POLYHEDRALSURFACE Z( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), (75 84),(75 77),(81 29),(77 73),(41 42),(83 72),(23 36),(89 53),(27 57),(57 97),(27 77),(39 88),(60 81), (80 72),(54 32),(55 26),(62 22),(70 20),(76 27),(84 35),(87 42),(82 54),(83 64),(69 86),(60 90),(50 86),(43 80),(36 73), (36 68),(40 75),(24 67),(23 60),(26 44),(28 33),(40 32),(43 19),(65 16),(73 16),(38 46),(31 59),(34 86),(45 90),(64 97))'::geometry,80.2)); - POLYGON((89 53,91 50,87 42,90 30,88 29,84 19,78 16,73 16,65 16,53 18,43 19, - 37 23,30 22,28 33,23 36,26 44,27 54,23 60,24 67,27 77, - 24 82,26 85,34 86,39 88,45 90,49 95,52 98,57 97, - 64 97,72 95,76 88,75 84,83 72,85 71,88 58,89 53)) + MULTIPOLYGON(((89 53,88 58,85 71,83 72,75 84,76 88,72 95,64 97,57 97,52 98,49 95,45 90,39 88,34 86,26 85,24 82,27 77,24 67,23 60,27 54,26 44,23 36,28 33,30 22,37 23,43 19,53 18,65 16,73 16,78 16,84 19,88 29,90 30,87 42,91 50,89 53))) @@ -1626,10 +1623,7 @@ ST_GeomFromText('POLYHEDRALSURFACE Z( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), (75 84),(75 77),(81 29),(77 73),(41 42),(83 72),(23 36),(89 53),(27 57),(57 97),(27 77),(39 88),(60 81), (80 72),(54 32),(55 26),(62 22),(70 20),(76 27),(84 35),(87 42),(82 54),(83 64),(69 86),(60 90),(50 86),(43 80),(36 73), (36 68),(40 75),(24 67),(23 60),(26 44),(28 33),(40 32),(43 19),(65 16),(73 16),(38 46),(31 59),(34 86),(45 90),(64 97))'::geometry, 100.1,true)) -POLYGON((89 53,91 50,87 42,90 30,84 19,78 16,73 16,65 16,53 18,43 19,30 22,28 33,23 36, -26 44,27 54,23 60,24 67,27 77,24 82,26 85,34 86,39 88,45 90,49 95,52 98,57 97,64 97,72 95, -76 88,75 84,83 72,85 71,88 58,89 53),(36 61,36 68,40 75,43 80,60 81,68 73,77 67, -81 60,82 54,81 47,78 43,76 27,62 22,54 32,44 42,38 46,36 61)) +MULTIPOLYGON(((89 53,88 58,85 71,83 72,75 84,76 88,72 95,64 97,57 97,52 98,49 95,45 90,39 88,34 86,26 85,24 82,27 77,24 67,23 60,27 54,26 44,23 36,28 33,30 22,43 19,53 18,65 16,73 16,78 16,84 19,90 30,87 42,91 50,89 53),(36 68,40 75,43 80,60 81,68 73,77 67,81 60,82 54,81 47,78 43,76 27,62 22,54 32,44 42,38 46,36 61,36 68))) @@ -1643,10 +1637,7 @@ ST_GeomFromText('POLYHEDRALSURFACE Z( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), SELECT ST_AsText(CG_AlphaShape( 'MULTIPOINT ((132 64), (114 64), (99 64), (81 64), (63 64), (57 49), (52 36), (46 20), (37 20), (26 20), (32 36), (39 55), (43 69), (50 84), (57 100), (63 118), (68 133), (74 149), (81 164), (88 180), (101 180), (112 180), (119 164), (126 149), (132 131), (139 113), (143 100), (150 84), (157 69), (163 51), (168 36), (174 20), (163 20), (150 20), (143 36), (139 49), (132 64), (99 151), (92 138), (88 124), (81 109), (74 93), (70 82), (83 82), (99 82), (112 82), (126 82), (121 96), (114 109), (110 122), (103 138), (99 151), (34 27), (43 31), (48 44), (46 58), (52 73), (63 73), (61 84), (72 71), (90 69), (101 76), (123 71), (141 62), (166 27), (150 33), (159 36), (146 44), (154 53), (152 62), (146 73), (134 76), (143 82), (141 91), (130 98), (126 104), (132 113), (128 127), (117 122), (112 133), (119 144), (108 147), (119 153), (110 171), (103 164), (92 171), (86 160), (88 142), (79 140), (72 124), (83 131), (79 118), (68 113), (63 102), (68 93), (35 45))'::geometry,102. 2, true)); - POLYGON((26 20,32 36,35 45,39 55,43 69,50 84,57 100,63 118,68 133,74 149,81 164,88 180, - 101 180,112 180,119 164,126 149,132 131,139 113,143 100,150 84,157 69,163 51,168 36, - 174 20,163 20,150 20,143 36,139 49,132 64,114 64,99 64,90 69,81 64,63 64,57 49,52 36,46 20,37 20,26 20), - (74 93,81 109,88 124,92 138,103 138,110 122,114 109,121 96,112 82,99 82,83 82,74 93)) + MULTIPOLYGON(((168 36,163 51,157 69,150 84,143 100,139 113,132 131,126 149,119 164,112 180,101 180,88 180,81 164,74 149,68 133,63 118,57 100,50 84,43 69,39 55,35 45,32 36,26 20,37 20,46 20,52 36,57 49,63 64,81 64,90 69,99 64,114 64,132 64,139 49,143 36,150 20,163 20,174 20,168 36),(81 109,88 124,92 138,103 138,110 122,114 109,121 96,112 82,99 82,83 82,74 93,81 109))) @@ -2447,8 +2438,7 @@ It always gives a 2D result even when used on a 3D geometry. (75 84),(75 77),(81 29),(77 73),(41 42),(83 72),(23 36),(89 53),(27 57),(57 97),(27 77),(39 88),(60 81), (80 72),(54 32),(55 26),(62 22),(70 20),(76 27),(84 35),(87 42),(82 54),(83 64),(69 86),(60 90),(50 86),(43 80),(36 73), (36 68),(40 75),(24 67),(23 60),(26 44),(28 33),(40 32),(43 19),(65 16),(73 16),(38 46),(31 59),(34 86),(45 90),(64 97))'::geometry)); - POLYGON((89 53,91 50,87 42,90 30,88 29,84 19,78 16,73 16,65 16,53 18,43 19,37 23,30 22,28 33,23 36, - 26 44,27 54,23 60,24 67,27 77,24 82,26 85,34 86,39 88,45 90,49 95,52 98,57 97,64 97,72 95,76 88,75 84,75 77,83 72,85 71,83 64,88 58,89 53)) + MULTIPOLYGON(((89 53,88 58,83 64,85 71,83 72,75 77,75 84,76 88,72 95,64 97,57 97,52 98,49 95,45 90,39 88,34 86,26 85,24 82,27 77,24 67,23 60,27 54,26 44,23 36,28 33,30 22,37 23,43 19,53 18,65 16,73 16,78 16,84 19,88 29,90 30,87 42,91 50,89 53))) @@ -2465,7 +2455,7 @@ It always gives a 2D result even when used on a 3D geometry. (75 84),(75 77),(81 29),(77 73),(41 42),(83 72),(23 36),(89 53),(27 57),(57 97),(27 77),(39 88),(60 81), (80 72),(54 32),(55 26),(62 22),(70 20),(76 27),(84 35),(87 42),(82 54),(83 64),(69 86),(60 90),(50 86),(43 80),(36 73), (36 68),(40 75),(24 67),(23 60),(26 44),(28 33),(40 32),(43 19),(65 16),(73 16),(38 46),(31 59),(34 86),(45 90),(64 97))'::geometry, allow_holes => true)); -POLYGON((89 53,91 50,87 42,90 30,88 29,84 19,78 16,73 16,65 16,53 18,43 19,37 23,30 22,28 33,23 36,26 44,27 54,23 60,24 67,27 77,24 82,26 85,34 86,39 88,45 90,49 95,52 98,57 97,64 97,72 95,76 88,75 84,75 77,83 72,85 71,83 64,88 58,89 53),(36 61,36 68,40 75,43 80,50 86,60 81,68 73,77 67,81 60,82 54,81 47,78 43,81 29,76 27,70 20,62 22,55 26,54 32,48 34,44 42,38 46,36 61)) +MULTIPOLYGON(((89 53,88 58,83 64,85 71,83 72,75 77,75 84,76 88,72 95,64 97,57 97,52 98,49 95,45 90,39 88,34 86,26 85,24 82,27 77,24 67,23 60,27 54,26 44,23 36,28 33,30 22,37 23,43 19,53 18,65 16,73 16,78 16,84 19,88 29,90 30,87 42,91 50,89 53),(36 68,40 75,43 80,50 86,60 81,68 73,77 67,81 60,82 54,81 47,78 43,81 29,76 27,70 20,62 22,55 26,54 32,48 34,44 42,38 46,36 61,36 68))) commit 256d02fa782f7d55240fc49fdf0d1305dd5dabda Author: Lo?c Bartoletti Date: Tue Feb 17 07:51:36 2026 +0100 chore(news): fix my first name diff --git a/NEWS b/NEWS index 684606d3a..fbde38635 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ xxxx/xx/xx - #5109, Document the meaning of topology.next_left_edge and topology.next_right_edge links (Darafei Praliaskouski) - #5889, [topology] Include representative locations in topology build errors (Darafei Praliaskouski) - #2614, Use GEOSPreparedDistance and caching to accelerate ST_DWithin (Paul Ramsey) - - GH-839, ST_Multi support for TIN and surfaces (Luca Bartoletti) + - GH-839, ST_Multi support for TIN and surfaces (Lo?c Bartoletti) * Bug Fixes * ----------------------------------------------------------------------- Summary of changes: NEWS | 3 ++- doc/reference_sfcgal.xml | 20 +++++--------------- sfcgal/regress/alphashape_components.sql | 4 ++++ sfcgal/regress/alphashape_components_expected | 2 ++ sfcgal/regress/tests.mk.in | 4 ++++ 5 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 sfcgal/regress/alphashape_components.sql create mode 100644 sfcgal/regress/alphashape_components_expected hooks/post-receive -- PostGIS From git at osgeo.org Tue Feb 17 08:10:13 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 17 Feb 2026 08:10:13 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-339-g6d7299047 Message-ID: <20260217161013.B756C3C33D@trac.osgeo.org> 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 6d729904766367e513963cbb330b58400d12025c (commit) from c154d2f6ff21d92044dbe32237e53961950c62e8 (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 6d729904766367e513963cbb330b58400d12025c Author: Regina Obe Date: Tue Feb 17 11:10:06 2026 -0500 Turn back on windows msys2 gha diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml index 602f177c2..4b6321dcc 100644 --- a/.github/workflows/msys.yml +++ b/.github/workflows/msys.yml @@ -5,7 +5,7 @@ jobs: mingw: # TODO: check to see if we need to disable again #if: github.repository == 'master' - if: false + if: true name: mingw runs-on: windows-latest strategy: ----------------------------------------------------------------------- Summary of changes: .github/workflows/msys.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From trac at osgeo.org Tue Feb 17 16:38:38 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 18 Feb 2026 00:38:38 -0000 Subject: [PostGIS] #4560: ST_3DInterpolatePoint In-Reply-To: <046.0c5f530ced274a58e267beab933ae3f5@osgeo.org> References: <046.0c5f530ced274a58e267beab933ae3f5@osgeo.org> Message-ID: <061.750c89b19bc6b243c05497bed30ca834@osgeo.org> #4560: ST_3DInterpolatePoint ----------------------+--------------------------- Reporter: robe | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Resolution: | Keywords: ----------------------+--------------------------- Comment (by robe): Replying to [comment:2 pramsey]: > So project the point in 3D and read off the M? > > {{{ > SELECT ST_InterpolatePoint('LINESTRING ZM (0 0 0 0, 10 0 10 20)', 'POINT Z (5 5 5)'); > }}} I'm not sure how that would work since M is changing along the line. Which M am I reading off. Some value between 0 and 20. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 18 07:07:31 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 18 Feb 2026 15:07:31 -0000 Subject: [PostGIS] #6051: GHA msys2 showing lots of warnings and one error Message-ID: <046.eb93640fab0a463f202e2a2c99be3c47@osgeo.org> #6051: GHA msys2 showing lots of warnings and one error ---------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.7.0 Component: build | Version: 3.5.x Keywords: windows | ---------------------+--------------------------- I turned msys2 back on in master, and it's failing. I can't remember the last time where it wwas erroring what it was erroring on that we decided to turn it off.. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Wed Feb 18 08:04:58 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 18 Feb 2026 16:04:58 -0000 Subject: [PostGIS] #6049: postgis_tiger_geocoder should not create tiger_data In-Reply-To: <046.f601aa66528bf783f46b4d604662dd76@osgeo.org> References: <046.f601aa66528bf783f46b4d604662dd76@osgeo.org> Message-ID: <061.ae5698991b374e7c266872056d659fce@osgeo.org> #6049: postgis_tiger_geocoder should not create tiger_data -----------------------------+---------------------------- Reporter: robe | Owner: robe Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.2.10 Component: tiger geocoder | Version: 3.5.x Resolution: | Keywords: -----------------------------+---------------------------- Changes (by tbussmann): * cc: tbussmann (added) Comment: I can confirm this (and [8c0b543d/git] for 3.3.10) does satisfy `make installcheck` and manual upgrades from 3.2.8 and 3.2.9 work as well. Thanks a lot. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From git at osgeo.org Fri Feb 20 02:58:22 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 20 Feb 2026 02:58:22 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-340-g8d6df5b8e Message-ID: <20260220105822.8F388137625@trac.osgeo.org> 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 8d6df5b8ef368723a125c62494a31b820b245413 (commit) from 6d729904766367e513963cbb330b58400d12025c (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 8d6df5b8ef368723a125c62494a31b820b245413 Author: Sandro Santilli Date: Fri Feb 20 11:55:43 2026 +0100 Make GEOS-3.10 the minimum required As per passed motion: https://lists.osgeo.org/pipermail/postgis-devel/2026-January/030713.html diff --git a/NEWS b/NEWS index 702d22393..eac939a70 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PostGIS 3.7.0dev xxxx/xx/xx +This version requires GEOS 3.10 or higher + * Breaking Changes * - #5688, [topology] topology building functions now interpret tolerance 0 diff --git a/README.postgis b/README.postgis index 65494b7a9..21faf6dbf 100644 --- a/README.postgis +++ b/README.postgis @@ -64,15 +64,11 @@ For apt-based systems you can run this command to install the below dependencies https://proj.org -* GEOS (Required, Version 3.8 or higher) +* GEOS (Required, Version 3.10 or higher) - 3.14+ for ST_CoverageClean, raster ST_IntersectionFractions - 3.12+ for ST_CoverageSimplify and ST_CoverageInvalidEdges - 3.11+ for improved ST_ConcaveHull, ST_lineMerge, and new functions ST_SimplifyPolygonHull, ST_TriangulatePolygon - - 3.10+ for ST_MakeValid enhancements - - 3.9+ is needed to take advantage of - fixed precision enhancements in overlay functions - - 3.7+ is needed just for the ST_FrechetDistance function The GEOS library provides support for exact topological tests such as ST_Touches(), ST_Contains(), ST_Disjoint() and spatial operations such as diff --git a/configure.ac b/configure.ac index 203740046..6a01d656f 100644 --- a/configure.ac +++ b/configure.ac @@ -777,7 +777,7 @@ dnl =========================================================================== dnl dnl Set the min version number here dnl -GEOS_MIN_VERSION=3.8.0 +GEOS_MIN_VERSION=3.10.0 GEOS_MIN_VERSION_NUMERIC=`echo $GEOS_MIN_VERSION | $PERL -nle 'printf "%d%02d%02d\n",$1,$2,$3 if /(\d+)\.(\d+)\.(\d+)/'` AC_ARG_WITH([geosconfig], ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ README.postgis | 6 +----- configure.ac | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Fri Feb 20 03:17:52 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 20 Feb 2026 03:17:52 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-341-gab5c625fb Message-ID: <20260220111753.35640207E1@trac.osgeo.org> 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 ab5c625fb6cd2d1b275d78f26a28b2f910eb6774 (commit) from 8d6df5b8ef368723a125c62494a31b820b245413 (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 ab5c625fb6cd2d1b275d78f26a28b2f910eb6774 Author: Sandro Santilli Date: Fri Feb 20 12:16:03 2026 +0100 Drop conditionals for GEOS < 3.10 diff --git a/doc/developer.md b/doc/developer.md index 1a1fcf33a..6b56c610b 100644 --- a/doc/developer.md +++ b/doc/developer.md @@ -289,8 +289,8 @@ We have guards in place in the code to handle these for dependency libraries * GEOS - c: ```c - #if POSTGIS_GEOS_VERSION < 31000 - /* GEOS < 3.1 code goes here */ + #if POSTGIS_GEOS_VERSION < 31300 + /* GEOS < 3.13 code goes here */ #endif ``` - test files: @@ -298,9 +298,9 @@ We have guards in place in the code to handle these for dependency libraries * raster/rt_pg/tests/tests.mi.in ```makefile - ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 31000),1) + ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 31300),1) TESTS += \ - # add tests that require GEOS 3.1 or higher to run + # add tests that require GEOS 3.13 or higher to run endif ``` diff --git a/liblwgeom/cunit/cu_geos.c b/liblwgeom/cunit/cu_geos.c index ed648dd0c..cbb9d0ba1 100644 --- a/liblwgeom/cunit/cu_geos.c +++ b/liblwgeom/cunit/cu_geos.c @@ -150,15 +150,9 @@ test_geos_makevalid(void) geom3 = lwgeom_normalize(geom2); //so GEOS 3.9 and 3.10 agree out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom3); -#if POSTGIS_GEOS_VERSION < 30900 - ASSERT_STRING_EQUAL( - out_ewkt, - "GEOMETRYCOLLECTION(POLYGON((92092.377 463437.77,92114.014 463463.469,92115.51207431706 463462.206937429,92115.512 463462.207,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.82600000006,92092.377 463437.77)),MULTIPOINT(92122.136 463412.826,92115.51207431706 463462.2069374289))"); -#else ASSERT_STRING_EQUAL( out_ewkt, "POLYGON((92092.377 463437.77,92114.014 463463.469,92115.512 463462.207,92115.51207431706 463462.2069374289,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.826,92092.377 463437.77))"); -#endif lwfree(out_ewkt); lwgeom_free(geom1); lwgeom_free(geom2); diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c index 102ed604d..e3fb18625 100644 --- a/liblwgeom/lwgeom_geos.c +++ b/liblwgeom/lwgeom_geos.c @@ -146,10 +146,6 @@ ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d) uint32_t dims = 2; POINTARRAY* pa; uint32_t size = 0; -#if POSTGIS_GEOS_VERSION < 31000 - uint32_t i; - POINT4D point = { 0.0, 0.0, 0.0, 0.0 }; -#endif LWDEBUG(2, "ptarray_fromGEOSCoordSeq called"); @@ -170,22 +166,8 @@ ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d) LWDEBUGF(4, " output dimensions: %d", dims); pa = ptarray_construct((dims == 3), 0, size); -#if POSTGIS_GEOS_VERSION >= 31000 GEOSCoordSeq_copyToBuffer(cs, (double*) pa->serialized_pointlist, (dims == 3), 0); return pa; -#else - for (i = 0; i < size; i++) - { - if (dims >= 3) - GEOSCoordSeq_getXYZ(cs, i, &(point.x), &(point.y), &(point.z)); - else - GEOSCoordSeq_getXY(cs, i, &(point.x), &(point.y)); - - ptarray_set_point4d(pa, i, &point); - } - - return pa; -#endif } /* Return an LWGEOM from a Geometry */ @@ -297,7 +279,6 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY* pa, uint8_t fix_ring) } } -#if POSTGIS_GEOS_VERSION >= 31000 if (append_points == 0) { sq = GEOSCoordSeq_copyFromBuffer((const double*) pa->serialized_pointlist, pa->npoints, FLAGS_GET_Z(pa->flags), FLAGS_GET_M(pa->flags)); if (!sq) @@ -306,7 +287,6 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY* pa, uint8_t fix_ring) } return sq; } -#endif if (!(sq = GEOSCoordSeq_create(pa->npoints + append_points, dims))) { GEOS_FAIL(); @@ -710,13 +690,7 @@ lwgeom_intersection_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec) if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1); if ( prec >= 0) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Fixed-precision intersection", "3.9"); - GEOS_FREE_AND_FAIL(g1, g2); - return NULL; -#else g3 = GEOSIntersectionPrec(g1, g2, prec); -#endif } else { @@ -807,13 +781,7 @@ lwgeom_unaryunion_prec(const LWGEOM* geom, double prec) if (!(g1 = LWGEOM2GEOS(geom, AUTOFIX))) GEOS_FAIL(); if ( prec >= 0) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Fixed-precision unary union", "3.9"); - GEOS_FREE_AND_FAIL(g1); - return NULL; -#else g3 = GEOSUnaryUnionPrec(g1, prec); -#endif } else { @@ -859,13 +827,7 @@ lwgeom_difference_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec) if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1); if ( prec >= 0) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Fixed-precision difference", "3.9"); - GEOS_FREE_AND_FAIL(g1, g2); - return NULL; -#else g3 = GEOSDifferencePrec(g1, g2, prec); -#endif } else { @@ -910,13 +872,7 @@ lwgeom_symdifference_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec) if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1); if ( prec >= 0) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Fixed-precision symdifference", "3.9"); - GEOS_FREE_AND_FAIL(g1, g2); - return NULL; -#else g3 = GEOSSymDifferencePrec(g1, g2, prec); -#endif } else { @@ -969,11 +925,6 @@ lwgeom_centroid(const LWGEOM* geom) LWGEOM* lwgeom_reduceprecision(const LWGEOM* geom, double gridSize) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Precision reduction", "3.9"); - return NULL; -#else - LWGEOM* result; int32_t srid = RESULT_SRID(geom); uint8_t is3d = FLAGS_GET_Z(geom->flags); @@ -999,7 +950,6 @@ lwgeom_reduceprecision(const LWGEOM* geom, double gridSize) GEOS_FREE(g1, g3); return result; -#endif } LWGEOM * @@ -1063,13 +1013,7 @@ lwgeom_union_prec(const LWGEOM* geom1, const LWGEOM* geom2, double gridSize) if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1); if ( gridSize >= 0) { -#if POSTGIS_GEOS_VERSION < 30900 - lwgeom_geos_error_minversion("Fixed-precision union", "3.9"); - GEOS_FREE_AND_FAIL(g1, g2); - return NULL; -#else g3 = GEOSUnionPrec(g1, g2, gridSize); -#endif } else { @@ -1814,11 +1758,7 @@ lwgeom_get_geos_coordseq_2d(const LWGEOM* g, uint32_t num_points) return NULL; } -#if POSTGIS_GEOS_VERSION < 30800 - if (!GEOSCoordSeq_setX(coords, i, tmp.x) || !GEOSCoordSeq_setY(coords, i, tmp.y)) -#else if (!GEOSCoordSeq_setXY(coords, i, tmp.x, tmp.y)) -#endif { GEOSCoordSeq_destroy(coords); lwpointiterator_destroy(it); diff --git a/liblwgeom/lwgeom_geos_clean.c b/liblwgeom/lwgeom_geos_clean.c index 75e2200a4..580859621 100644 --- a/liblwgeom/lwgeom_geos_clean.c +++ b/liblwgeom/lwgeom_geos_clean.c @@ -327,9 +327,6 @@ lwgeom_make_valid_params(LWGEOM* lwgeom_in, char* make_valid_params) LWDEBUG(4, "geom converted to GEOS"); } -#if POSTGIS_GEOS_VERSION < 31000 - geosout = GEOSMakeValid(geosgeom); -#else if (!make_valid_params) { geosout = GEOSMakeValid(geosgeom); } @@ -378,7 +375,6 @@ lwgeom_make_valid_params(LWGEOM* lwgeom_in, char* make_valid_params) geosout = GEOSMakeValidWithParams(geosgeom, params); GEOSMakeValidParams_destroy(params); } -#endif GEOSGeom_destroy(geosgeom); if (!geosout) return NULL; diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index e4aacfcfe..989faabf7 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -265,15 +265,6 @@ Datum ST_FrechetDistance(PG_FUNCTION_ARGS) PG_FUNCTION_INFO_V1(ST_MaximumInscribedCircle); Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS) { -#if POSTGIS_GEOS_VERSION < 30900 - - lwpgerror("The GEOS version this PostGIS binary " - "was compiled against (%d) doesn't support " - "'GEOSMaximumInscribedCircle' function (3.9.0+ required)", - POSTGIS_GEOS_VERSION); - PG_RETURN_NULL(); - -#else /* POSTGIS_GEOS_VERSION >= 30900 */ GSERIALIZED* geom; GSERIALIZED* center; GSERIALIZED* nearest; @@ -381,8 +372,6 @@ Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS) result = HeapTupleGetDatum(resultTuple); PG_RETURN_DATUM(result); - -#endif /* POSTGIS_GEOS_VERSION >= 30900 */ } @@ -390,15 +379,6 @@ Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS) PG_FUNCTION_INFO_V1(ST_LargestEmptyCircle); Datum ST_LargestEmptyCircle(PG_FUNCTION_ARGS) { -#if POSTGIS_GEOS_VERSION < 30900 - - lwpgerror("The GEOS version this PostGIS binary " - "was compiled against (%d) doesn't support " - "'GEOSMaximumInscribedCircle' function (3.9.0+ required)", - POSTGIS_GEOS_VERSION); - PG_RETURN_NULL(); - -#else /* POSTGIS_GEOS_VERSION >= 30900 */ GSERIALIZED* geom; GSERIALIZED* boundary; GSERIALIZED* center; @@ -510,8 +490,6 @@ Datum ST_LargestEmptyCircle(PG_FUNCTION_ARGS) result = HeapTupleGetDatum(resultTuple); PG_RETURN_DATUM(result); - -#endif /* POSTGIS_GEOS_VERSION >= 30900 */ } diff --git a/postgis/lwgeom_geos_predicates.c b/postgis/lwgeom_geos_predicates.c index fb8989f05..1219117f8 100644 --- a/postgis/lwgeom_geos_predicates.c +++ b/postgis/lwgeom_geos_predicates.c @@ -1039,15 +1039,6 @@ Datum LWGEOM_dwithin(PG_FUNCTION_ARGS) double tolerance = PG_GETARG_FLOAT8(2); double mindist; -#if POSTGIS_GEOS_VERSION < 31000 - const GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0); - const GSERIALIZED *geom2 = PG_GETARG_GSERIALIZED_P(1); - LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); - LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - mindist = lwgeom_mindistance2d_tolerance(lwgeom1, lwgeom2, tolerance); - PG_RETURN_BOOL(tolerance >= mindist); - -#else SHARED_GSERIALIZED *shared_geom1 = ToastCacheGetGeometry(fcinfo, 0); SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1); const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1); @@ -1111,8 +1102,6 @@ Datum LWGEOM_dwithin(PG_FUNCTION_ARGS) } PG_RETURN_BOOL(is_dwithin); - -#endif } diff --git a/regress/core/tests.mk.in b/regress/core/tests.mk.in index a89b77bfc..a2f66dad1 100644 --- a/regress/core/tests.mk.in +++ b/regress/core/tests.mk.in @@ -33,137 +33,129 @@ TESTS += \ $(top_srcdir)/regress/core/binary \ $(top_srcdir)/regress/core/boundary \ $(top_srcdir)/regress/core/chaikin \ - $(top_srcdir)/regress/core/filterm \ + $(top_srcdir)/regress/core/clean \ + $(top_srcdir)/regress/core/clipbybox2d \ $(top_srcdir)/regress/core/cluster \ + $(top_srcdir)/regress/core/computed_columns \ $(top_srcdir)/regress/core/ctors \ $(top_srcdir)/regress/core/curvetoline \ + $(top_srcdir)/regress/core/delaunaytriangles \ $(top_srcdir)/regress/core/dump \ $(top_srcdir)/regress/core/dumppoints \ $(top_srcdir)/regress/core/dumpsegments \ $(top_srcdir)/regress/core/empty \ $(top_srcdir)/regress/core/estimatedextent \ - $(top_srcdir)/regress/core/forcecurve \ + $(top_srcdir)/regress/core/filterm \ + $(top_srcdir)/regress/core/fixedoverlay \ $(top_srcdir)/regress/core/flatgeobuf \ + $(top_srcdir)/regress/core/forcecurve \ $(top_srcdir)/regress/core/frechet \ $(top_srcdir)/regress/core/generate_points \ $(top_srcdir)/regress/core/geography \ $(top_srcdir)/regress/core/geography_centroid \ $(top_srcdir)/regress/core/geography_covers \ $(top_srcdir)/regress/core/geometric_median \ - $(top_srcdir)/regress/core/geos_noop \ + $(top_srcdir)/regress/core/geos310 \ $(top_srcdir)/regress/core/geos38 \ + $(top_srcdir)/regress/core/geos39 \ + $(top_srcdir)/regress/core/geos_noop \ $(top_srcdir)/regress/core/hausdorff \ + $(top_srcdir)/regress/core/in_encodedpolyline \ $(top_srcdir)/regress/core/in_flatgeobuf \ $(top_srcdir)/regress/core/in_geohash \ $(top_srcdir)/regress/core/in_gml \ $(top_srcdir)/regress/core/in_kml \ $(top_srcdir)/regress/core/in_marc21 \ - $(top_srcdir)/regress/core/out_marc21 \ - $(top_srcdir)/regress/core/in_encodedpolyline \ $(top_srcdir)/regress/core/iscollection \ + $(top_srcdir)/regress/core/isvaliddetail \ $(top_srcdir)/regress/core/legacy \ $(top_srcdir)/regress/core/letters \ $(top_srcdir)/regress/core/lwgeom_regress \ $(top_srcdir)/regress/core/measures \ $(top_srcdir)/regress/core/minimum_bounding_circle \ + $(top_srcdir)/regress/core/minimum_clearance \ + $(top_srcdir)/regress/core/node \ $(top_srcdir)/regress/core/normalize \ + $(top_srcdir)/regress/core/offsetcurve \ $(top_srcdir)/regress/core/operators \ $(top_srcdir)/regress/core/orientation \ + $(top_srcdir)/regress/core/oriented_envelope \ $(top_srcdir)/regress/core/out_flatgeobuf \ - $(top_srcdir)/regress/core/out_geometry \ $(top_srcdir)/regress/core/out_geography \ + $(top_srcdir)/regress/core/out_geojson \ + $(top_srcdir)/regress/core/out_geometry \ $(top_srcdir)/regress/core/out_gml \ + $(top_srcdir)/regress/core/out_marc21 \ + $(top_srcdir)/regress/core/point_coordinates \ $(top_srcdir)/regress/core/polygonize \ $(top_srcdir)/regress/core/polyhedralsurface \ $(top_srcdir)/regress/core/postgis_type_name \ $(top_srcdir)/regress/core/quantize_coordinates \ $(top_srcdir)/regress/core/regress \ $(top_srcdir)/regress/core/regress_bdpoly \ + $(top_srcdir)/regress/core/regress_brin_index \ + $(top_srcdir)/regress/core/regress_brin_index_3d \ + $(top_srcdir)/regress/core/regress_brin_index_geography \ $(top_srcdir)/regress/core/regress_buffer_params \ $(top_srcdir)/regress/core/regress_gist_index_nd \ $(top_srcdir)/regress/core/regress_index \ $(top_srcdir)/regress/core/regress_index_nulls \ - $(top_srcdir)/regress/core/regress_management \ - $(top_srcdir)/regress/core/regress_selectivity \ $(top_srcdir)/regress/core/regress_lrs \ + $(top_srcdir)/regress/core/regress_management \ $(top_srcdir)/regress/core/regress_ogc \ $(top_srcdir)/regress/core/regress_ogc_cover \ $(top_srcdir)/regress/core/regress_ogc_prep \ - $(top_srcdir)/regress/core/regress_proj_basic \ - $(top_srcdir)/regress/core/regress_proj_adhoc \ - $(top_srcdir)/regress/core/regress_proj_cache_overflow \ $(top_srcdir)/regress/core/regress_proj_4890 \ + $(top_srcdir)/regress/core/regress_proj_adhoc \ + $(top_srcdir)/regress/core/regress_proj_basic \ + $(top_srcdir)/regress/core/regress_proj_cache_overflow \ $(top_srcdir)/regress/core/regress_proj_pipeline \ + $(top_srcdir)/regress/core/regress_selectivity \ $(top_srcdir)/regress/core/relate \ + $(top_srcdir)/regress/core/relatematch \ $(top_srcdir)/regress/core/remove_irrelevant_points_for_view \ + $(top_srcdir)/regress/core/removepoint \ $(top_srcdir)/regress/core/remove_repeated_points \ $(top_srcdir)/regress/core/remove_small_parts \ - $(top_srcdir)/regress/core/removepoint \ $(top_srcdir)/regress/core/reverse \ $(top_srcdir)/regress/core/scroll \ $(top_srcdir)/regress/core/setpoint \ + $(top_srcdir)/regress/core/sharedpaths \ $(top_srcdir)/regress/core/simplify \ $(top_srcdir)/regress/core/simplifyvw \ $(top_srcdir)/regress/core/size \ + $(top_srcdir)/regress/core/snap \ $(top_srcdir)/regress/core/snaptogrid \ $(top_srcdir)/regress/core/split \ - $(top_srcdir)/regress/core/sql-mm-serialize \ $(top_srcdir)/regress/core/sql-mm-circularstring \ $(top_srcdir)/regress/core/sql-mm-compoundcurve \ $(top_srcdir)/regress/core/sql-mm-curvepoly \ $(top_srcdir)/regress/core/sql-mm-general \ $(top_srcdir)/regress/core/sql-mm-multicurve \ $(top_srcdir)/regress/core/sql-mm-multisurface \ - $(top_srcdir)/regress/core/swapordinates \ + $(top_srcdir)/regress/core/sql-mm-serialize \ + $(top_srcdir)/regress/core/subdivide \ $(top_srcdir)/regress/core/summary \ + $(top_srcdir)/regress/core/swapordinates \ $(top_srcdir)/regress/core/temporal \ $(top_srcdir)/regress/core/temporal_knn \ $(top_srcdir)/regress/core/tickets \ $(top_srcdir)/regress/core/triangulatedsurface \ $(top_srcdir)/regress/core/twkb \ $(top_srcdir)/regress/core/typmod \ + $(top_srcdir)/regress/core/unaryunion \ + $(top_srcdir)/regress/core/union \ + $(top_srcdir)/regress/core/voronoi \ $(top_srcdir)/regress/core/wkb \ $(top_srcdir)/regress/core/wkt \ $(top_srcdir)/regress/core/wmsservers \ - $(top_srcdir)/regress/core/offsetcurve \ - $(top_srcdir)/regress/core/relatematch \ - $(top_srcdir)/regress/core/isvaliddetail \ - $(top_srcdir)/regress/core/sharedpaths \ - $(top_srcdir)/regress/core/snap \ - $(top_srcdir)/regress/core/node \ - $(top_srcdir)/regress/core/unaryunion \ - $(top_srcdir)/regress/core/union \ - $(top_srcdir)/regress/core/clean \ - $(top_srcdir)/regress/core/delaunaytriangles \ - $(top_srcdir)/regress/core/clipbybox2d \ - $(top_srcdir)/regress/core/subdivide \ - $(top_srcdir)/regress/core/voronoi \ - $(top_srcdir)/regress/core/regress_brin_index \ - $(top_srcdir)/regress/core/regress_brin_index_3d \ - $(top_srcdir)/regress/core/regress_brin_index_geography \ - $(top_srcdir)/regress/core/minimum_clearance \ - $(top_srcdir)/regress/core/oriented_envelope \ - $(top_srcdir)/regress/core/point_coordinates \ - $(top_srcdir)/regress/core/out_geojson \ - $(top_srcdir)/regress/core/wrapx \ - $(top_srcdir)/regress/core/computed_columns + $(top_srcdir)/regress/core/wrapx # Slow slow tests TESTS_SLOW = \ $(top_srcdir)/regress/core/concave_hull_hard \ $(top_srcdir)/regress/core/knn_recheck -ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30900),1) - # GEOS-3.9 adds stable maximuminscribedcircle implementation - TESTS += \ - $(top_srcdir)/regress/core/geos39 \ - $(top_srcdir)/regress/core/fixedoverlay -endif - -ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 31000),1) - TESTS += \ - $(top_srcdir)/regress/core/geos310 -endif ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 31100),1) TESTS += \ ----------------------------------------------------------------------- Summary of changes: doc/developer.md | 8 ++-- liblwgeom/cunit/cu_geos.c | 6 --- liblwgeom/lwgeom_geos.c | 60 ---------------------------- liblwgeom/lwgeom_geos_clean.c | 4 -- postgis/lwgeom_geos.c | 22 ----------- postgis/lwgeom_geos_predicates.c | 11 ------ regress/core/tests.mk.in | 84 ++++++++++++++++++---------------------- 7 files changed, 42 insertions(+), 153 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Fri Feb 20 04:51:30 2026 From: git at osgeo.org (git at osgeo.org) Date: Fri, 20 Feb 2026 04:51:30 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.6.0rc2-347-gb4b2bd007 Message-ID: <20260220125131.363E2237B3@trac.osgeo.org> 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 b4b2bd00716a5d81404cc34fc8f6288e5ec23cc1 (commit) via ac5b80cf48dd92e5fab51c5fffb6e61e2c061c25 (commit) via fa4245e195341fdd57f47c8cc2399eff1cba1dfd (commit) via 9d7f791fb0f9f298792857c82704370a11d78122 (commit) via 962a3f6a450418a42d77f8fac168c391ccfbe0b9 (commit) via cfba45ae42aad4c17950f0ed3d2fa31603b9ac2b (commit) from ab5c625fb6cd2d1b275d78f26a28b2f910eb6774 (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 b4b2bd00716a5d81404cc34fc8f6288e5ec23cc1 Author: Anonymous Date: Fri Feb 20 10:59:03 2026 +0000 Translated PostGIS Manual using Weblate (Portuguese (Brazil)) Currently translated at 41.0% (2417 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/pt_BR/ diff --git a/doc/po/pt_BR/postgis-manual.po b/doc/po/pt_BR/postgis-manual.po index 2d1b1b5ce..7da959afa 100644 --- a/doc/po/pt_BR/postgis-manual.po +++ b/doc/po/pt_BR/postgis-manual.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2025-12-09 16:47+0000\n" -"Last-Translator: Rodrigo Smarzaro \n" +"PO-Revision-Date: 2026-02-20 12:51+0000\n" +"Last-Translator: Anonymous \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.4.3\n" +"X-Generator: Weblate 5.16\n" #. Tag: chapter #, no-c-format @@ -5872,9 +5872,9 @@ msgid "Performed by the GEOS module." msgstr "Desempenhado pelo m?dulo GEOS." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "These examples use edges we created in " -msgstr "Estes exemplos utilizam limites que criamos em " +msgstr "Estes exemplos utilizam limites que criamos em" #. Tag: para #, no-c-format @@ -32206,7 +32206,7 @@ msgid "Description: Variants 3 and 4 (two raster)" msgstr "Descri??o: Variantes 3 e 4 (dois rasters)" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Creates a new one band raster formed by applying a valid PostgreSQL " "algebraic operation to the two bands defined by the expressionexpression no raster " -"de sa?da (rast). Se nband, " -"band2 n?o forem especificados, a banda 1 ? assumida. O " -"raster resultante ser? alinhado (escala, inclina??o e cantos de pixel) na " -"grade definida pelo primeiro raster. O raster resultante ter? de ser " -"definido pelo primeiro raster. O raster resultante ter? a extens?o definida " -"pelo par?metro extenttype." +"de sa?da (rast). Se nband, " +"band2 n?o forem especificados, a banda 1 ? assumida. O raster " +"resultante ser? alinhado (escala, inclina??o e cantos de pixel) na grade " +"definida pelo primeiro raster. O raster resultante ter? de ser definido pelo " +"primeiro raster. O raster resultante ter? a extens?o definida pelo par?metro " +"extenttype." #. Tag: para #, no-c-format @@ -44942,10 +44942,10 @@ msgstr "" "derrubar estes e substitu?-los com ?ndice de casco convexo. " #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Apply raster constraints using " -msgstr "Aplique restri??es rasters usando " +msgstr "Aplique restri??es rasters usando" #. Tag: title #, no-c-format commit ac5b80cf48dd92e5fab51c5fffb6e61e2c061c25 Author: Anonymous Date: Fri Feb 20 10:59:03 2026 +0000 Translated PostGIS Manual using Weblate (Korean) Currently translated at 40.1% (2365 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/ko/ diff --git a/doc/po/ko_KR/postgis-manual.po b/doc/po/ko_KR/postgis-manual.po index 9c21046cf..e4d384894 100644 --- a/doc/po/ko_KR/postgis-manual.po +++ b/doc/po/ko_KR/postgis-manual.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2023-10-14 20:23+0000\n" +"PO-Revision-Date: 2026-02-20 12:51+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Korean \n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.0\n" +"X-Generator: Weblate 5.16\n" #. Tag: chapter #, no-c-format @@ -911,7 +911,7 @@ msgstr "" "????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is a text (token number 1): This is the street number on a " "street. Example 75 in 75 State Street." @@ -929,7 +929,7 @@ msgstr "" "?? ???? ??? ???(STREET NAME PRE-DIRECTIONAL)???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text (token number 3): STREET NAME PRE-MODIFIER Example " "OLD in 3715 OLD HIGHWAY 99." @@ -951,7 +951,7 @@ msgid "is text (token number 5): STREET NAME" msgstr "???(?? ?? 5)???: ???(STREET NAME)???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text (token number 6): STREET POST TYPE e.g. St, Ave, Cir. A " "street type following the root street name. Example STREET75 State Street ?? STREET" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text (token number 7): STREET POST-DIRECTIONAL A directional " "modifier that follows the street name.. Example WEST in " @@ -990,7 +990,7 @@ msgid "is text (token number 10): Example Boston." msgstr "???(?? ?? 10)???: ?: ??? ?" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text (token number 11): Example MASSACHUSETTS" msgstr "???(?? ?? 11)???: ?: ????? ?" @@ -1010,7 +1010,7 @@ msgstr "" "02109" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text POSTAL BOX NUMBER (token number 14 and 15): Example " "02109" @@ -1019,7 +1019,7 @@ msgstr "" "NUMBER)???: ?: 02109" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "is text Apartment number or Suite Number (token number 17): " "Example 3B in APT 3B." @@ -1503,7 +1503,7 @@ msgid "" msgstr "" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 15): The 3B in " "BOX 3B" @@ -1512,16 +1512,16 @@ msgstr "" "role=\"bold\">3B" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 8): The RR in " "RR 7" msgstr "" -"(?? ?? 8): RR 7 ?? RR" +"(?? ?? 8): RR 7 ?? " +"RR" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 16): The APT " "in APT 3B" @@ -1530,7 +1530,7 @@ msgstr "" "role=\"bold\">APT" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 17): The 3B in " "APT 3B" @@ -1796,7 +1796,7 @@ msgid "Variant 1: Takes an address as a single line." msgstr "?? 1: ??? ?? ??? ??????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Variant 2: Takes an address as 2 parts. A micro " "consisting of standard first line of postal address e.g. house_num " @@ -1805,8 +1805,8 @@ msgid "" msgstr "" "?? 2: ??? ? ???? ??????. house_num street ?? " "?? ??? ?? ? ?? ??? ???? micro ??, " -"city, state postal_code country ?? ?? ??? ?? ? ?? ?" -"?? ???? macro ????." +"city, state postal_code country ?? ?? ??? ?? ? ?? " +"??? ???? macro ????." #. Tag: para #, no-c-format @@ -2416,7 +2416,7 @@ msgstr "" "linkend=\"ST_Y\"/>" #. Tag: refpurpose -#, no-c-format +#, fuzzy, no-c-format msgid "" "Takes in 2 streets that intersect and a state, city, zip, and outputs a set " "of possible locations on the first cross street that is at the intersection, " @@ -2427,13 +2427,14 @@ msgid "" "10. Uses Tiger data (edges, faces, addr), PostgreSQL fuzzy string matching " "(soundex, levenshtein)." msgstr "" -"???? ?? 2?? ?, ?, ???? ???? NAD83 ???? ??? ??? ?" -"?? geomout, ? ??? ?? normalized_address (addy) ? ??? ????, ????? ?? ????? ??? ?? ?" -"?? ?? ???? ??? ?????. ??? ???? ??? ??? ??? ?" -"??? ????. ??? ??? ?? ??? ?????. ??? ?? ??(??" -"? 10) ?? ????? ??? ? ????. TIGER ???(edge, face, addr) ? " -"PostgreSQL ?? ??? ??(soundex, levenshtein)? ?????." +"???? ?? 2?? ?, ?, ???? ???? NAD83 ???? ??? ??? " +"??? geomout, ? ??? ?? " +"normalized_address (addy) ? ??? ????, ????? ?? " +"????? ??? ?? ??? ?? ???? ??? ?????. ??? " +"???? ??? ??? ??? ???? ????. ??? ??? ?? ??? " +"?????. ??? ?? ??(??? 10) ?? ????? ??? ? ????. " +"TIGER ???(edge, face, addr) ? PostgreSQL ?? ??? ??(soundex, " +"levenshtein)? ?????." #. Tag: para #, no-c-format @@ -3495,7 +3496,7 @@ msgstr "" "????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "region_id This is what TIGER calls the geoid. It is the " "unique identifier of the region in the table. For place it is the " @@ -3503,11 +3504,11 @@ msgid "" "county it is the cntyidfp column in tiger." "county" msgstr "" -"region_id - TIGER? ?? ID(geoid)?? ??? ?????" -"?. ???? ?? ??? ??? ??????. place ? ?" -"? tiger.place ???? ?? plcidfp ?" -"???. county ? ?? tiger.county ?" -"??? ?? cntyidfp ????." +"region_id - TIGER? ?? ID(geoid)?? ??? " +"??????. ???? ?? ??? ??? ??????. place ? ?? tiger.place ???? ?? " +"plcidfp ????. county ? ?? " +"tiger.county ???? ?? cntyidfp ????." #. Tag: title #, no-c-format @@ -5005,13 +5006,13 @@ msgstr "" "??? ???? ???? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Adds a collection of geometries to a given empty topology and returns " "a message detailing success." msgstr "" -"? ? ?? ??? ???? ??? ??? ?? ?? ?? ??? ?" -"??? ???? ???? ?????." +"? ? ?? ??? ???? ??? ??? ?? ?? ?? ??? " +"???? ???? ???? ?????." #. Tag: para #, no-c-format @@ -6300,15 +6301,15 @@ msgstr "" "??, ?? ?? ?? ?? ??? ???? ???? ???? ????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The geometry of aline must have the same srid as defined for the topology otherwise an invalid spatial reference " "sys error will be thrown." msgstr "" -"aline ??? srid ? ??? ?? ??" -"? srid ? ????? ???. ??? ?? ?? ???? ?" -"? ?? ?? ??? ??? ??? ????." +"aline ??? srid ? ??? ?? " +"??? srid ? ????? ???. ??? ?? ?? " +"???? ?? ?? ?? ??? ??? ??? ????." #. Tag: para #, no-c-format @@ -6393,15 +6394,15 @@ msgstr "" "? ???? ? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The apolygon geometry must have the same srid as defined for the topology otherwise an invalid spatial reference " "sys error will be thrown." msgstr "" -"apolygon ??? srid ? ??? ?? ?" -"?? srid ? ????? ???. ??? ?? ?? ???? " -"?? ?? ?? ??? ??? ??? ????." +"apolygon ??? srid ? ??? ?? " +"??? srid ? ????? ???. ??? ?? ?? " +"???? ?? ?? ?? ??? ??? ??? ????." #. Tag: refpurpose #, no-c-format @@ -6717,7 +6718,7 @@ msgid "Clears the content of a topo geometry." msgstr "" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Clears the content a turning it into an " "empty one. Mostly useful in conjunction with " @@ -6725,9 +6726,9 @@ msgid "" "hierarchical levels." msgstr "" " ? ??? ??? ? ? ? ????. ??" -"? ???? ?? ?? ? ? ?? ?? ??? ?? ?? ???? ??? ??" -"? ???? ? ?? ?????." +"linkend=\"topogeometry\"/> ? ????. " +"??? ???? ?? ?? ? ? ?? ?? ??? ?? ?? ???? ??? " +"??? ???? ? ?? ?????." #. Tag: para #, no-c-format @@ -7498,7 +7499,7 @@ msgstr "" "?? ?? ??? ?? ?? ?????. " #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "GNU Make (gmake or make). For many " "systems, GNU make is the default version of make. Check " @@ -7506,8 +7507,8 @@ msgid "" "make may not process the PostGIS Makefile properly." msgstr "" -"GNU Make(gmake ?? make). ?? ?" -"????? GNU make ? make? ?? ?????. " +"GNU Make(gmake ?? make). ?? " +"?????? GNU make ? make? ?? ?????. " "make -v? ?? ??? ??????. ?? ??? make? " "PostGIS Makefile? ??? ???? ? ? ?? ????." @@ -8220,7 +8221,7 @@ msgstr "" "LD_LIBRARY_PATH ?? ??? ?? ????? ??? ?????? ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Currently, the make check relies on the PATH " "and PGPORT environment variables when performing the checks - " @@ -8233,8 +8234,8 @@ msgstr "" "??, make check ???? ??? ??? PATH" "? PGPORT ?? ??? ????. PostgreSQL? ?? ????? " "--with-pgconfig? ???? ??? ??? ???? " -"????. ???, PostgreSQL ???? ????? ???" -"?? PATH? ???????." +"????. ???, PostgreSQL ???? ????? " +"????? PATH? ???????." #. Tag: para #, no-c-format @@ -8351,29 +8352,29 @@ msgid "" msgstr "PostGIS ??????? [prefix]/lib? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If you previously ran the make comments command to " "generate the postgis_comments.sql, " "raster_comments.sql file, install the sql file by " "running" msgstr "" -"?? ??? postgis_comments.sql, " -"raster_comments.sql ??? ???? ?? make " -"comments ???? ??? ?? ?????, ??? ??? sql ??? " +"?? ??? postgis_comments.sql, " +"raster_comments.sql ??? ???? ?? make comments ???? ??? ?? ?????, ??? ??? sql ??? " "??????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "postgis_comments.sql, raster_comments.sql, topology_comments.sql was separated from the " "typical build and installation targets since with it comes the extra " "dependency of xsltproc." msgstr "" -"xsltproc? ?? ?? ???? ????? " -"postgis_comments.sql, raster_comments.sql, topology_comments.sql? ???????." +"xsltproc? ?? ?? ???? ????? " +"postgis_comments.sql, raster_comments.sql, " +"topology_comments.sql? ???????." #. Tag: title #, no-c-format @@ -8845,14 +8846,14 @@ msgstr "" "???? ??? ???? ??? ???. ??? ??? ??? ? ????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "After the states you desire have been loaded, make sure to run the: " "SELECT install_missing_indexes(); as " "described in ." msgstr "" -"??? ???? ??? ? ? ?" -"? ??? ?? ??? ??????: SELECT " +"??? ???? ??? ? ? " +"?? ??? ?? ??? ??????: SELECT " "install_missing_indexes();" #. Tag: para @@ -17804,7 +17805,7 @@ msgstr "" "?(Geometry Factory) ??? ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If an SRID is not specified, it defaults to 0. NULL is " "returned if the input bytea does not represent a " @@ -17856,7 +17857,7 @@ msgstr "" "SQL?? ?? ??(Geometry Factory) ??? ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If an SRID is not specified, it defaults to 0. NULL is " "returned if the input bytea does not represent a " @@ -17912,7 +17913,7 @@ msgstr "" "(Geometry Factory) ??? ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If an SRID is not specified, it defaults to 0. NULL is " "returned if the input bytea does not represent a " @@ -19165,7 +19166,7 @@ msgstr "" "??." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If the oid of a view is provided, as with a table oid, " "this function tries to determine the srid, dimension, and type of all the " @@ -19173,10 +19174,10 @@ msgid "" "geometry_columns table, but nothing is done to enforce " "constraints." msgstr "" -"oid ???? ?? oid ?? ??? ?" -"?, ? ??? geometry_columns ???? ??? ??? ??" -"?? ?? ?? ?? ??? SRID, ??, ??? ???? ???, ????? ?" -"???? ????." +"oid ???? ?? oid ?? ??? " +"??, ? ??? geometry_columns ???? ??? ??? " +"???? ?? ?? ?? ??? SRID, ??, ??? ???? ???, " +"????? ????? ????." #. Tag: para #, no-c-format @@ -26733,7 +26734,7 @@ msgstr "" "? ??? ?? ????? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The ovfactor parameter represents the scale multiplier in " "the overview column: higher overview factors have lower resolution." @@ -27028,15 +27029,15 @@ msgstr "" "??(??)???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "For the variants that take outdbfile (Variants 6 and 7), " "the value must include the full path to the raster file. The file must also " "be accessible to the postgres server process." msgstr "" -"outdbfile ? ???? ?? 6 ? 7? ??, " -"outdbfile ?? ??? ??? ???? ?? ??? ????" -"? ???. PostgreSQL ?? ????? ?? ??? ??? ? ???? ???." +"outdbfile ? ???? ?? 6 ? 7? ??, " +"outdbfile ?? ??? ??? ???? ?? ??? ????? " +"???. PostgreSQL ?? ????? ?? ??? ??? ? ???? ???." #. Tag: para #, no-c-format @@ -30432,7 +30433,7 @@ msgstr "" "?? ??? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If no band is specified nband defaults to 1. If no " "searchvalues are specified, will return all pixel values " @@ -30441,10 +30442,10 @@ msgid "" "that pixel band value" msgstr "" "??? ?? ???? ?? ?? nband ? ???? 1???. " -"searchvalues ? ???? ?? ??, ??? ?? ??? ?" -"????? ??? ?? ?? ?? ??? ????. searchvalues ? ??? ????, ??? ?? ?? ?? ?? ?? ?? ??? ??" -"? ???? ??? ??? ????." +"searchvalues ? ???? ?? ??, ??? ?? ??? " +"?????? ??? ?? ?? ?? ??? ????. searchvalues ? ??? ????, ??? ?? ?? ?? ?? ?? ?? ??? " +"??? ???? ??? ??? ????." #. Tag: para #, no-c-format @@ -31563,7 +31564,7 @@ msgstr "" "? ?? ???? ????)? ???? ? ?(?/??)???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If pixeltype is passed in, the one band of the new raster " "will be of that pixeltype. If pixeltype is passed NULL or left out, the new " @@ -31572,12 +31573,13 @@ msgid "" "specified band of the appropriate raster (for extent types: SECOND, LAST). " "If in doubt, always specify pixeltype." msgstr "" -"pixeltype ? ??? ??, ? ???? ?? ??? ?? ?" -"? ??? ? ????. pixeltype ? NULL??? ??? ?" -"?, ? ??? ??? ? ?? ???? ??? ???(?? ??? ??: " +"pixeltype ? ??? ??, ? ???? ?? ??? ?? " +"?? ??? ? ????. pixeltype ? NULL??? ??? " +"??, ? ??? ??? ? ?? ???? ??? ???(?? ??? ??: " "INTERSECTION, UNION, FIRST, CUSTOM), ?? ??? ???? ??? ???(?? " -"??? ??: SECOND, LAST) ??? ?? ??? ??? ? ????. ?? ???" -"? ???? ? ???, ??? pixeltype ? ??????." +"??? ??: SECOND, LAST) ??? ?? ??? ??? ? ????. ?? " +"???? ???? ? ???, ??? pixeltype ? " +"??????." #. Tag: para #, no-c-format @@ -31653,15 +31655,15 @@ msgstr "" "? \"SQL Functions with Variable Numbers of Arguments\" ??? ??????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the callbackfunc is " "required, regardless of whether you choose to pass any arguments to the " "callback function for processing or not." msgstr "" -"???? ???? ?? ?? ??? ?? ??? ????? ?? ??? ???" -"?, callbackfunc ? ???? text[] ??? ?" -"????." +"???? ???? ?? ?? ??? ?? ??? ????? ?? ??? " +"????, callbackfunc ? ???? text[] " +"??? ?????." #. Tag: para #, no-c-format @@ -31814,15 +31816,15 @@ msgstr "" "?, ??? 1?? ?? ????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If pixeltype is passed in, then the new raster will have " "a band of that pixeltype. If pixeltype is passed NULL, then the new raster " "band will have the same pixeltype as the input rast band." msgstr "" -"pixeltype ? ??? ??, ? ???? ??? ?? ?? ?" -"?? ? ????. pixeltype ? NULL? ??, ? ???? ?" -"?? ?? rast ? ??? ??? ?? ??? ? ????." +"pixeltype ? ??? ??, ? ???? ??? ?? ?? " +"??? ? ????. pixeltype ? NULL? ??, ? ???? " +"??? ?? rast ? ??? ??? ?? ??? ? ????." #. Tag: para #, no-c-format @@ -31940,7 +31942,7 @@ msgstr "" "??." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "An algebraic expression involving only rast2 or a " "constant that defines what to return when pixels of rast1 " @@ -31951,7 +31953,7 @@ msgstr "" "???? ???, ?? rast2 ?? ??? ?? ??????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "An algebraic expression involving only rast1 or a " "constant that defines what to return when pixels of rast2 " @@ -32183,17 +32185,17 @@ msgstr "" "UNION, FIRST, SECOND? ? ? ????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If pixeltype is passed in, then the new raster will have " "a band of that pixeltype. If pixeltype is passed NULL or no pixel type " "specified, then the new raster band will have the same pixeltype as the " "input rast1 band." msgstr "" -"pixeltype ? ??? ??, ? ???? ??? ?? ?? ?" -"?? ? ????. pixeltype ? NULL??? ?? ???? ?" -"? ??, ? ???? ??? ?? rast1 ? ??? ??? ?" -"? ??? ? ????." +"pixeltype ? ??? ??, ? ???? ??? ?? ?? " +"??? ? ????. pixeltype ? NULL??? ?? ???? " +"?? ??, ? ???? ??? ?? rast1 ? ??? ??? " +"?? ??? ? ????." #. Tag: para #, no-c-format @@ -32352,15 +32354,15 @@ msgstr "" "varname> ? ????, args ??? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the userfunction is " "required, regardless of whether you choose to pass any arguments to your " "user function for processing or not." msgstr "" "?? ??? ?? ??? ??? ?? ??? ????? ?? ??? ????, " -"userfunction ? ???? text[] ??? ???" -"??." +"userfunction ? ???? text[] ??? " +"?????." #. Tag: para #, no-c-format @@ -32417,17 +32419,17 @@ msgstr "" "????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If pixeltype is passed in, then the new raster will have " "a band of that pixeltype. If pixeltype is passed NULL or left out, then the " "new raster band will have the same pixeltype as the input rast1 band." msgstr "" -"pixeltype ? ??? ??, ? ???? ??? ?? ?? ?" -"?? ? ????. pixeltype ? NULL??? ?? ???? ?" -"? ??, ? ???? ??? ?? rast1 ? ??? ??? ?" -"? ??? ? ????." +"pixeltype ? ??? ??, ? ???? ??? ?? ?? " +"??? ? ????. pixeltype ? NULL??? ?? ???? " +"?? ??, ? ???? ??? ?? rast1 ? ??? ??? " +"?? ??? ? ????." #. Tag: para #, no-c-format @@ -32462,15 +32464,15 @@ msgid "" msgstr "" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the tworastuserfunc " "is required, regardless of whether you choose to pass any arguments to your " "user function for processing or not." msgstr "" "?? ??? ?? ??? ??? ?? ??? ????? ?? ??? ????, " -"tworastuserfunc ? ???? text[] ??? ?" -"????." +"tworastuserfunc ? ???? text[] ??? " +"?????." #. Tag: para #, no-c-format @@ -32782,7 +32784,7 @@ msgstr "" "??? ?? ??? 1? ??? ??? ???? ?? ???? ?????." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Returns the union of a set of raster tiles into a single raster composed of " "at least one band. The resulting raster's extent is the extent of the whole " @@ -32791,10 +32793,10 @@ msgid "" "FIRST, MIN, MAX, COUNT, SUM, MEAN, RANGE." msgstr "" "??? ?? ??? ??? ?? 1?? ???? ?? ???? ?????. ?? " -"???? ??? ?? ??? ?????. ?? ??? ??, " -"uniontype ? ?? ?? ?????. uniontype ? ?? LAST(???), FIRST, MIN, MAX, COUNT, SUM, MEAN, RANGE ??" -"? ?????." +"???? ??? ?? ??? ?????. ?? ??? ??, " +"uniontype ? ?? ?? ?????. uniontype ? " +"?? LAST(???), FIRST, MIN, MAX, COUNT, SUM, MEAN, RANGE ??? " +"?????." #. Tag: para #, no-c-format @@ -41478,14 +41480,15 @@ msgstr "" "emphasis> ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "MULTIPOINTs are simple if no two " "coordinates (POINTs) are equal (have identical coordinate " "values)." msgstr "" -"MULTIPOINT ? ?? ? ??(POINT)? ?" -"??? ?? (??? ??? ???? ??) ??? ???." +"MULTIPOINT ? ?? ? ??(POINT)? " +"???? ?? (??? ??? ???? ??) ??? " +"???." #. Tag: para #, no-c-format @@ -44708,7 +44711,7 @@ msgstr "" "?." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If you created your tables not with the loader or forgot to specify the " "-C flag during load, you can enforce the constraints " @@ -44717,9 +44720,9 @@ msgid "" "about your raster tiles." msgstr "" "??? ?? ??? ???? ???? ???? ?? ???? -C ??? ??? ??? ??, ??? ?? ?? " -"raster_columns ????? ???? ??? ??? ?? ?" -"? ??? ????? ??? ?? " +"varname> ??? ??? ??? ??, ??? ?? ?? " +"raster_columns ????? ???? ??? ??? ?? ?? ??? " +"????? ??? ?? " "????? ??? ? ????." #. Tag: para @@ -44769,17 +44772,17 @@ msgstr "" "linkend=\"spatial_ref_sys\"/> ??? ?? ????? ???." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "scale_x The scaling between geometric spatial coordinates " "and pixel. This is only available if all tiles in the raster column have the " "same scale_x and this constraint is applied. Refer to " " for more details." msgstr "" -"scale_x ???? ?? ??? ??? ??(??)???. ??" -"? ?? ?? ?? ??? ??? scale_x ? ???, " -"scale_x ????? ??? ???? ??? ? ????. ?" -"?? ??? ? ??????." +"scale_x ???? ?? ??? ??? ??(??)???. " +"??? ?? ?? ?? ??? ??? scale_x ? ???, " +"scale_x ????? ??? ???? ??? ? ????. " +"??? ??? ? ??????." #. Tag: para #, no-c-format commit fa4245e195341fdd57f47c8cc2399eff1cba1dfd Author: Teramoto Ikuhiro Date: Fri Feb 20 10:59:04 2026 +0000 Translated PostGIS Manual using Weblate (Japanese) Currently translated at 99.5% (5864 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/ja/ diff --git a/doc/po/ja/postgis-manual.po b/doc/po/ja/postgis-manual.po index 2977df717..cd8eaa640 100644 --- a/doc/po/ja/postgis-manual.po +++ b/doc/po/ja/postgis-manual.po @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" "PO-Revision-Date: 2026-02-20 12:51+0000\n" -"Last-Translator: Anonymous \n" +"Last-Translator: Teramoto Ikuhiro \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -35894,7 +35894,7 @@ msgstr "" "????8BUI???????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Creates a new raster formed by applying a reclassification operation defined " "by the reclassexpr on the input raster (rast Date: Fri Feb 20 10:58:52 2026 +0000 Translated PostGIS Manual using Weblate (Japanese) Currently translated at 99.5% (5864 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/ja/ diff --git a/doc/po/ja/postgis-manual.po b/doc/po/ja/postgis-manual.po index ede31cb10..2977df717 100644 --- a/doc/po/ja/postgis-manual.po +++ b/doc/po/ja/postgis-manual.po @@ -10,16 +10,16 @@ msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2026-02-12 06:47+0000\n" -"Last-Translator: Teramoto Ikuhiro \n" -"Language-Team: Japanese \n" +"PO-Revision-Date: 2026-02-20 12:51+0000\n" +"Last-Translator: Anonymous \n" +"Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.4.3\n" +"X-Generator: Weblate 5.16\n" #. Tag: chapter #, no-c-format @@ -1715,7 +1715,7 @@ msgid "(token number 0): Unparsed building identifiers and types." msgstr "(?????? 0): ??????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 14): The BOX " "in BOX 3B" @@ -1724,7 +1724,7 @@ msgstr "" "role=\"bold\">BOX???????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 15): The 3B in " "BOX 3B" @@ -1733,16 +1733,16 @@ msgstr "" "role=\"bold\">3B???????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 8): The RR in " "RR 7" msgstr "" -"(?????? 8): RR 7??RR???????" +"(?????? 8): RR 7??" +"RR???????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 16): The APT " "in APT 3B" @@ -1751,7 +1751,7 @@ msgstr "" "role=\"bold\">APT???????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "(token number 17): The 3B in " "APT 3B" @@ -2037,17 +2037,17 @@ msgid "Variant 1: Takes an address as a single line." msgstr "1?????: ??????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Variant 2: Takes an address as 2 parts. A micro " "consisting of standard first line of postal address e.g. house_num " "street, and a macro consisting of standard postal second line of an " "address e.g city, state postal_code country." msgstr "" -"2?????: ???????????????micro?" -"house_num street???????????????1?????" -"macro??city, state postal_code country??" -"?????????????2?????" +"2?????: ???????????????micro?" +"house_num street???????????????1?????" +"macro??city, state postal_code country???????" +"????????2?????" #. Tag: para #, no-c-format @@ -7514,7 +7514,7 @@ msgstr "" "??" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Returns a set of element_id,element_type (topoelements) corresponding to " "primitive topology elements (1: nodes, 2: " @@ -9059,7 +9059,7 @@ msgstr "" "??????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Currently, the make check relies on the PATH " "and PGPORT environment variables when performing the checks - " @@ -9069,12 +9069,12 @@ msgid "" "installation during configuration or be prepared to deal with the impending " "headaches." msgstr "" -"??????make check??????????? ????" -"PATH?PGPORT???????????????????" -"?????--with-pgconfig????????PostgreSQL??" -"??????PATH????????????????????" -"????PostgreSQL?????????????????????????????" -"??????????????" +"??????make check??????????? ???" +"?PATH?PGPORT????????" +"????????????????--with-pgconfig?????" +"???PostgreSQL????????PATH??????" +"??????????????????PostgreSQL???????????????" +"????????????????????????????" #. Tag: para #, no-c-format @@ -9753,7 +9753,7 @@ msgstr "" "???????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "After the states you desire have been loaded, make sure to run the: " "SELECT install_missing_indexes(); as " @@ -12365,17 +12365,17 @@ msgstr "" "???????????geometry_dump??????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "A set-returning function (SRF) that extracts the components of a geometry. " "It returns a set of rows, each containing " "a geometry (geom field) and an array of integers " "(path field)." msgstr "" -"???????????????????? (SRF=Set-Returning Function)????" -"???? (geom?????)????? (path?????)???????????" -"???" +"???????????????????? (SRF=Set-Returning Function)???" +"????? (geom?????)????? (" +"path?????)????????" +"??????" #. Tag: para #, no-c-format @@ -12446,7 +12446,7 @@ msgstr "" "??" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "A set-returning function (SRF) that extracts the coordinates (vertices) of a " "geometry. It returns a set of rows, each " @@ -12534,17 +12534,17 @@ msgstr "" "??" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "A set-returning function (SRF) that extracts the segments of a geometry. It " "returns a set of rows, each containing a " "geometry (geom field) and an array of integers " "(path field)." msgstr "" -"???????????????????? (SRF=Set-Returning Function)????" -"???? (geom?????)????? (path?????)???????????" -"???" +"???????????????????? (SRF=Set-Returning Function)???" +"????? (geom?????)????? (" +"path?????)????????" +"??????" #. Tag: para #, no-c-format @@ -12602,30 +12602,30 @@ msgstr "" "???????????geometry_dump??????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "A set-returning function (SRF) that extracts the rings of a polygon. It " "returns a set of rows, each containing a " "geometry (geom field) and an array of integers " "(path field)." msgstr "" -"???????????????????? (SRF=Set-Returning Function)????" -"???? (geom?????)????? (path?????)???????????" -"???" +"???????????????????? (SRF=Set-Returning Function)???" +"????? (geom?????)????? (" +"path?????)????????" +"??????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The geom field contains each ring as a POLYGON. The " "path field is an integer array of length 1 containing " "the polygon ring index. The exterior ring (shell) has index 0. The interior " "rings (holes) have indices of 1 and higher." msgstr "" -"???????????????????? (SRF=Set-Returning Function)????" -"???? (geom?????)????? (path?????)???????????" -"???" +"???????????????????? (SRF=Set-Returning Function)???" +"????? (geom?????)????? (" +"path?????)????????" +"??????" #. Tag: para #, no-c-format @@ -13214,17 +13214,16 @@ msgid "Tests if a LineString is closed and simple." msgstr "??????????????????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Returns TRUE if this LINESTRING is " "both (ST_StartPoint(g) ~= " "ST_Endpoint(g)) and (does not self " "intersect)." msgstr "" -"??LINESTRING?(ST_StartPoint(g) ~= ST_Endpoint(g))??(?????????)????TRUE" -"??????" +"??LINESTRING?(" +"ST_StartPoint(g) ~= ST_Endpoint(g))??" +"(?????????)????TRUE??????" #. Tag: para #, no-c-format @@ -14665,14 +14664,14 @@ msgid "An input geometry is added to a cluster if it is either:" msgstr "???????????????????????????????:" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "A \"core\" geometry, that is within eps distance of at least minpoints input geometries (including itself); or" msgstr "" -"??????????????????? (?????)????????" -"minpoints??eps?????" +"minpoints??eps????????????????????" #. Tag: para @@ -21062,7 +21061,7 @@ msgstr "" "?????????? (??????)" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If a table oid is provided, this function tries to " "determine the srid, dimension, and geometry type of all geometry columns in " @@ -21070,11 +21069,11 @@ msgid "" "row is inserted into the geometry_columns table, otherwise, the exception is " "caught and an error notice is raised describing the problem." msgstr "" -"?????oid??????????????????????" -"???????????SRID?????????????????????????" -"???????????? ?????????geometry_columns??????????????????????????????????" -"?????????????" +"?????oid??????????????????" +"???????????????SRID?????????????????????" +"???????????????? ?????????" +"geometry_columns?????????????????????????" +"??????????????????????" #. Tag: para #, no-c-format @@ -21090,7 +21089,7 @@ msgstr "" "varname>????????????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The parameterless variant is a simple wrapper for the parameterized variant " "that first truncates and repopulates the geometry_columns table for every " @@ -21101,11 +21100,11 @@ msgid "" "returns the number of rows inserted into the geometry_columns table." msgstr "" -"???????????geometry_columns?????????" -"??????????????????????????????????????" -"??????????????????????????????????????" -"????????????????geometry_columns?????" -"????????????????????????geometry_columnsgeometry_columns??????????" +"??????????????????????????????????????" +"??????????????????????????????????????" +"???????????????geometry_columns??????" +"???????????????????????geometry_columns???????????????" #. Tag: para @@ -31635,15 +31634,15 @@ msgstr "" "???????)????????X?Y (?????)??????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Return record format: geom , val double precision, x " "integer, y integers." msgstr "" "???????????????geom???????????val????" -"x????y???" +"parameter>???????????val????" +"x????y???" #. Tag: para #, no-c-format @@ -34887,7 +34886,7 @@ msgstr "" "Arguments\" (??: ??????????????SQL???)??????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the callbackfunc is " "required, regardless of whether you choose to pass any arguments to the " @@ -35593,7 +35592,7 @@ msgstr "" "args?????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the userfunction is " "required, regardless of whether you choose to pass any arguments to your " @@ -35714,7 +35713,7 @@ msgstr "" "userargs?????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The text[] argument to the tworastuserfunc " "is required, regardless of whether you choose to pass any arguments to your " @@ -39851,7 +39850,7 @@ msgstr "" "???3??????????????3????????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Returns true if the 3D distance between two geometry values is no larger " "than distance distance_of_srid. The distance is specified " @@ -39859,9 +39858,9 @@ msgid "" "function to make sense the source geometries must be in the same coordinate " "system (have the same SRID)." msgstr "" -"??????????3?????distance_of_srid????" -"TRUE???????????????????????????" -"????????????????????????????????????? " +"??????????3?????distance_of_srid???" +"?TRUE??????????????????????????" +"?????????????????????????????????????? " "(??SRID???)????????????" #. Tag: para @@ -45255,7 +45254,7 @@ msgid "Geometry Data Type" msgstr "???????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "PostGIS implements the OGC Simple Features model by defining a PostgreSQL " "data type called geometry. It represents all of the " @@ -46085,7 +46084,7 @@ msgstr "" "???" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "MULTIPOINTs are simple if no two " "coordinates (POINTs) are equal (have identical coordinate " @@ -48002,7 +48001,7 @@ msgstr "" "????????????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The geography datatype is supported for BRIN indexing. The " "syntax for building a BRIN index on a geography column is:" @@ -48278,7 +48277,7 @@ msgstr "" "??????????????????????????" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "If SET ENABLE_SEQSCAN TO OFF; helps your query to run " "faster, your Postgres is likely not tuned for your hardware. If you find the " @@ -48290,13 +48289,13 @@ msgid "" "planner more likely to use index scans." msgstr "" "SET ENABLE_SEQSCAN TO OFF;????????????????" -"PostgreSQL?????????????????????????????????" -"????????????????????????????????" -"postgresql.conf????RANDOM_PAGE_COST???" -"??????????SET RANDOM_PAGE_COST TO 1.1;?????" -"RANDOM_PAGE_COST????????4.0???1.1 (SSD???)?" -"??2.0 (???????????)??????????????????????" -"???????????????????????" +"PostgreSQL???????????????????????????????" +"??????????????????????????????????" +"postgresql.conf????RANDOM_PAGE_COST??????" +"???????SET RANDOM_PAGE_COST TO 1.1;????" +"?RANDOM_PAGE_COST????????4.0???1.1 (SSD???)" +"???2.0 (???????????)????????????????????" +"?????????????????????????" #. Tag: para #, no-c-format commit 962a3f6a450418a42d77f8fac168c391ccfbe0b9 Author: Anonymous Date: Fri Feb 20 10:59:04 2026 +0000 Translated PostGIS Manual using Weblate (Italian) Currently translated at 24.1% (1426 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/it/ diff --git a/doc/po/it_IT/postgis-manual.po b/doc/po/it_IT/postgis-manual.po index c3eded8a9..cf326a6ba 100644 --- a/doc/po/it_IT/postgis-manual.po +++ b/doc/po/it_IT/postgis-manual.po @@ -10,8 +10,8 @@ msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2025-03-31 15:47+0000\n" -"Last-Translator: luca \n" +"PO-Revision-Date: 2026-02-20 12:51+0000\n" +"Last-Translator: Anonymous \n" "Language-Team: Italian \n" "Language: it_IT\n" @@ -19,7 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.4.3\n" +"X-Generator: Weblate 5.16\n" #. Tag: chapter #, no-c-format @@ -41319,7 +41319,7 @@ msgid "Spatial Queries" msgstr "Interrogazioni spaziali" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The raison d'etre of spatial databases is to perform " "queries inside the database which would ordinarily require desktop GIS " commit cfba45ae42aad4c17950f0ed3d2fa31603b9ac2b Author: Anonymous Date: Fri Feb 20 10:58:43 2026 +0000 Translated PostGIS Manual using Weblate (German) Currently translated at 48.7% (2873 of 5893 strings) Translation: postgis/PostGIS Manual Translate-URL: https://weblate.osgeo.org/projects/postgis/postgis-manual/de/ diff --git a/doc/po/de/postgis-manual.po b/doc/po/de/postgis-manual.po index 773d2888e..7aa860276 100644 --- a/doc/po/de/postgis-manual.po +++ b/doc/po/de/postgis-manual.po @@ -9,8 +9,8 @@ msgstr "" "Project-Id-Version: postgis 3.5\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2025-11-13 16:23+0000\n" -"PO-Revision-Date: 2024-12-17 12:47+0000\n" -"Last-Translator: Andreas Schild \n" +"PO-Revision-Date: 2026-02-20 12:51+0000\n" +"Last-Translator: Anonymous \n" "Language-Team: German \n" "Language: de\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.4.3\n" +"X-Generator: Weblate 5.16\n" #. Tag: chapter #, no-c-format @@ -3315,7 +3315,7 @@ msgstr "" "sind, ben?tigt." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "This function just uses the various direction/state/suffix lookup tables " "preloaded with the tiger_geocoder and located in the tigertiger.geocode_settings table. Settings allow you to toggle debugging of functions. Later " @@ -9933,7 +9933,7 @@ msgstr "" "k?nnen sie laden wenn Sie diese ben?tigen." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "After the states you desire have been loaded, make sure to run the: " "SELECT install_missing_indexes(); as " @@ -24069,7 +24069,7 @@ msgstr "" "Geographie B ident sind." #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The = operator returns TRUE if the " "coordinates and coordinate order geometry/geography A are the same as the " @@ -24082,7 +24082,7 @@ msgstr "" "und die Reihenfolge der Koordinaten der Geometrie/Geographie A und der " "Geometrie/Geographie B ident sind. PostgreSQL verwendet die =, <, und " "> Operatoren um die interne Sortierung und den Vergleich von Geometrien " -"durchzuf?hren (z.B.: in einer GROUP BY oder ORDER BY Klausel).?" +"durchzuf?hren (z.B.: in einer GROUP BY oder ORDER BY Klausel)." #. Tag: para #, no-c-format @@ -34821,7 +34821,7 @@ msgid "" msgstr "" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "Returns consisting of count, sum, mean, " "stddev, min, max for a given raster band of a raster or raster coverage. If " @@ -39762,7 +39762,7 @@ msgid "Maximum number of open files per process" msgstr "Die maximale Anzahl ge?ffneter Dateien pro Prozess" #. Tag: title -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum number of open files for the entire system" msgstr "" "Die maximale Anzahl ge?ffneter Dateien f?r das ganze System" @@ -50234,7 +50234,7 @@ msgid "Spatial Queries" msgstr "R?umliche Abfrage" #. Tag: para -#, no-c-format +#, fuzzy, no-c-format msgid "" "The raison d'etre of spatial databases is to perform " "queries inside the database which would ordinarily require desktop GIS " ----------------------------------------------------------------------- Summary of changes: doc/po/de/postgis-manual.po | 22 ++-- doc/po/it_IT/postgis-manual.po | 8 +- doc/po/ja/postgis-manual.po | 175 ++++++++++++++------------- doc/po/ko_KR/postgis-manual.po | 265 +++++++++++++++++++++-------------------- doc/po/pt_BR/postgis-manual.po | 28 ++--- 5 files changed, 250 insertions(+), 248 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Fri Feb 20 09:23:41 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 20 Feb 2026 17:23:41 -0000 Subject: [PostGIS] #6052: Spin off postgis_tiger_geocoder as separate project Message-ID: <046.664a93489c0a4b9da43591e3964cc468@osgeo.org> #6052: Spin off postgis_tiger_geocoder as separate project ----------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.7.0 Component: tiger geocoder | Version: master Keywords: | ----------------------------+--------------------------- As discussed and so far agreed on, we are spinning off postgis_tiger_geocoder as separate project. https://lists.osgeo.org/pipermail/postgis-devel/2026-February/030735.html and with that move, I'm also going to use gitea as issue tracker instead of trac. -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Fri Feb 20 11:43:46 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 20 Feb 2026 19:43:46 -0000 Subject: [PostGIS] #6052: Spin off postgis_tiger_geocoder as separate project In-Reply-To: <046.664a93489c0a4b9da43591e3964cc468@osgeo.org> References: <046.664a93489c0a4b9da43591e3964cc468@osgeo.org> Message-ID: <061.158b6de5c07f09aaa12722171358d397@osgeo.org> #6052: Spin off postgis_tiger_geocoder as separate project -----------------------------+--------------------------- Reporter: robe | Owner: robe Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.7.0 Component: tiger geocoder | Version: master Resolution: | Keywords: -----------------------------+--------------------------- Comment (by robe): I've created the new project home here - https://git.osgeo.org/postgis /tiger-geocoder Still not ready to build the extension yet, but once it is I'll remove postgis_tiger_geocoder from 3.7 codebase -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Fri Feb 20 16:11:29 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 21 Feb 2026 00:11:29 -0000 Subject: [PostGIS] #6053: Spin off address_standardizer as separate project Message-ID: <049.f4d1eb5ea5ce334e1b08e74f1d6e7c99@osgeo.org> #6053: Spin off address_standardizer as separate project ---------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Keywords: | ---------------------+--------------------------- As discussed and so far agreed on, we are spinning off postgis_tiger_geocoder and Spin off postgis_tiger_geocoder as separate project as separate projects ?https://lists.osgeo.org/pipermail/postgis-devel/2026-February/030735.html -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project. From trac at osgeo.org Fri Feb 20 16:15:08 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 21 Feb 2026 00:15:08 -0000 Subject: [PostGIS] #6053: Spin off address_standardizer as separate project In-Reply-To: <049.f4d1eb5ea5ce334e1b08e74f1d6e7c99@osgeo.org> References: <049.f4d1eb5ea5ce334e1b08e74f1d6e7c99@osgeo.org> Message-ID: <064.bed06fbc89be2656a6449f4aea17deb2@osgeo.org> #6053: Spin off address_standardizer as separate project ----------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: defect | Status: assigned Priority: medium | Milestone: PostGIS 3.7.0 Component: postgis | Version: master Resolution: | Keywords: ----------------------+--------------------------- Description changed by pramsey: Old description: > As discussed and so far agreed on, we are spinning off > postgis_tiger_geocoder and Spin off postgis_tiger_geocoder as separate > project as separate projects > > ?https://lists.osgeo.org/pipermail/postgis- > devel/2026-February/030735.html New description: As discussed and so far agreed on, we are spinning off postgis_tiger_geocoder and address_standardizer as separate project as separate projects ?https://lists.osgeo.org/pipermail/postgis-devel/2026-February/030735.html -- -- Ticket URL: PostGIS The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.