Subject: Include h3-pg extension

From: "Regina Obe" <[email-masked]>
Date: Fri, 3 Nov 2023 22:44:32 -0400

I couldn't find this when searching, so assume it's not available yet on
apt.postgresql.org.

H3-pg is an Uber Hexagon Extension commonly used with PostGIS and is growing
in popularity.

It relies on postgis and postgis_raster extensions.

https://github.com/zachasme/h3-pg

Would you consider carrying it?

Thanks,
Regina

---

From: Christoph Berg <[email-masked]>
Date: Sat, 4 Nov 2023 10:50:39 +0100

Re: Regina Obe
> Would you consider carrying it?

Hi Regina,

it looks like https://github.com/uber/h3 hasn't been packaged yet,
which makes this a bit more complicated.

I'll see if I can find the time to package both.

Christoph

---

From: Devrim Gündüz <[email-masked]>
Date: Sun, 05 Nov 2023 00:37:13 +0000

Hi Christoph,

On Sat, 2023-11-04 at 10:50 +0100, Christoph Berg wrote:
> I'll see if I can find the time to package both

There are some overlapping files between h3 and h3-pg. I did not check
closely, but you may not have to package h3. Just a FYI.

Cheers,
-- 
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR

---

From: Christoph Berg <[email-masked]>
Date: Sun, 5 Nov 2023 12:02:13 +0100

Re: Devrim Gündüz
> closely, but you may not have to package h3. Just a FYI.

It took me a while to figure out because it was hidden in an
unexpected location, but the reason h3-pg can be compiled without h3
is that it downloads it at build time:

CMakeLists.txt:
# Include core library
add_subdirectory(cmake/h3)

cmake/h3/CMakeLists.txt:
FetchContent_Declare(
  h3
  URL      https://github.com/uber/h3/archive/refs/tags/v${H3_CORE_VERSION}.tar.gz
  URL_HASH SHA256=${H3_CORE_SHA256}
)
FetchContent_MakeAvailable(h3)

Deleting the line from CMakeLists.txt made it properly use the
system-installed libh3.

Regina: postgresql-NN-h3 packages are in the repository.

Christoph

---

From: "Regina Obe" <[email-masked]>
Date: Sun, 5 Nov 2023 16:55:17 -0500

> Deleting the line from CMakeLists.txt made it properly use the
system-installed
> libh3.

Great thanks very much.  I just tried and works great so far.

apt update
apt postgresql-16-h3

and was able to install with

CREATE EXTENSION h3_postgis CASCADE;

Devrim,

While I have you.  I didn't check if yum.postgresql.org is carrying it.
Would be great if it did too.

Thanks,
Regina

---

From: Devrim Gündüz <[email-masked]>
Date: Sun, 05 Nov 2023 21:56:59 +0000

Hi,

On Sun, 2023-11-05 at 16:55 -0500, Regina Obe wrote:
> While I have you.  I didn't check if yum.postgresql.org is carrying
> it. Would be great if it did too.

Pushed the packages a few mins ago:

h3, and h3-devel: h3 RPMs
pg-h3_XY : Extension RPMS

Regards,

---

From: Christoph Berg <[email-masked]>
Date: Sun, 5 Nov 2023 23:00:29 +0100

Re: Devrim Gündüz
> pg-h3_XY : Extension RPMS

  5.11.23 22:55 Regina Obe      pgsql-pkg- RE: Include h3-pg extension
  5.11.23 22:56 Devrim Gündüz              └─>

That must be a new record :D

Christoph

---

From: "Regina Obe" <[email-masked]>
Date: Sun, 5 Nov 2023 17:30:42 -0500

> That must be a new record :D

Yes that was quick.  Thanks to both of you.

Devrim, just confirming you have it only for Rocky / Redhat/ CentOS 8  or above right.
Not seeing it for the 7 series.  Which is fine, just confirming.

Thanks,
Regina

---

From: Devrim Gündüz <[email-masked]>
Date: Sun, 05 Nov 2023 22:42:21 +0000

Hi Regina,

> Yes that was quick.  Thanks to both of you.

I actually started working on them yesterday :-)

> 
> Devrim, just confirming you have it only for Rocky / Redhat/ CentOS 8 
> or above right. Not seeing it for the 7 series.  Which is fine, just
> confirming.

Already stopped adding new packages to RHEL 7:

https://yum.postgresql.org/news/rhel7-postgresql-rpms-end-of-life/

Cheers,