<div dir="ltr">Thank you very much Paul for the fast and complete reply!<div><br></div><div>Thanks also for the pointer to <a href="https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/postgis/postgis.sql.in">postgis.sql.in</a> - I'd missed that and it's really helpful to understand PostGIS's internals.</div><div><br></div><div>I'm aware that the OIDs are dynamic, but thanks for the reminder! I look them up after establishing the DB connection:</div><div>  <a href="https://github.com/twpayne/pgx-geos/blob/6f61360a93a5751a59511540bc2119cbae033ca0/geom.go#L184">https://github.com/twpayne/pgx-geos/blob/6f61360a93a5751a59511540bc2119cbae033ca0/geom.go#L184</a></div><div><br></div><div>Are there any plans to add binary representations of box2d and box3d? The background story is that <a href="https://pkg.go.dev/github.com/jackc/pgx/v5">https://pkg.go.dev/github.com/jackc/pgx/v5</a> uses Postgres's binary protocol when possible for performance, so I suspect/fear that if a query includes a box2d or box3d then jackc/pgx will have to switch to the lower-performance text-based protocol. In practice, this is unlikely to be a real problem, but I'm curious :)</div><div><br></div><div>Thanks again, and best regards,</div><div>Tom<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 7 Jun 2024 at 20:36, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Jun 7, 2024 at 1:49 AM Tom Payne <<a href="mailto:twpayne@gmail.com" target="_blank">twpayne@gmail.com</a>> wrote:<br>
<br>
> obstacledb=# SELECT typname, oid FROM pg_type WHERE typname IN ('box2d', 'box2df', 'box3d', 'gidx');<br>
>  typname |   oid<br>
> ---------+---------<br>
>  box3d   | 5248539<br>
>  box2d   | 5248543<br>
>  box2df  | 5248547<br>
>  gidx    | 5248551<br>
> (4 rows)<br>
<br>
Oh, and you probably already know this, but just for completeness: the<br>
Oid numbers of the PostGIS types will VARY between databases, because<br>
they are assigned at run-time by the PostgreSQL server. So the Oid you<br>
have for geometry will not be the same as the one I have.<br>
<br>
ATB,<br>
P<br>
</blockquote></div>