PostGIS 3.6.1 - ERROR: operator is not unique: public.geometry = public.geometry
Regina Obe
lr at pcorp.us
Thu Jan 8 09:14:58 PST 2026
Cedric,
Good news. I was able to replicate.
I noticed in your output you have the fully qualified type name, which means you don’t have postgis schema in your search path.
To replicate I did:
set search_path='pg_catalog';
SELECT 'POINT EMPTY'::public.geometry = 'POINT EMPTY'::public.geometry;
Gives:
ERROR: operator is not unique: public.geometry = public.geometry LINE 1: SELECT 'POINT EMPTY'::public.geometry = 'POINT EMPTY'::publi... ^
So I’m guessing we have some code in our = path that is not schema qualified.
I’ve ticketed the issue here:
https://trac.osgeo.org/postgis/ticket/6033
Paul,
Can you confirm you can replicate by changing your search_path?
From: Cedric Duprez <cedric.duprez at ign.fr>
Sent: Thursday, January 8, 2026 12:05 PM
To: Regina Obe <lr at pcorp.us>; 'Paul Ramsey' <pramsey at cleverelephant.ca>
Cc: postgis-users at lists.osgeo.org
Subject: Re: PostGIS 3.6.1 - ERROR: operator is not unique: public.geometry = public.geometry
I get two lines with the following query:
SELECT oprcode, oprleft::regtype, oprright::regtype
FROM pg_catalog.pg_operator
WHERE oprname = '=' AND oprleft::regtype::text IN('public.geometry', 'public.geography')
ORDER BY oprleft, oprright;
Query result:
oprcode |oprleft |oprright
-------------------+----------------+----------------
public.geometry_eq |public.geometry |public.geometry
public.geography_eq|public.geography|public.geography
Extensions are :
extname |extversion
------------------+----------
plpgsql |1.0
ogr_fdw |1.1
plr |8.4.8.2
pg_stat_statements|1.11
pgcrypto |1.3
tablefunc |1.0
postgis_raster |3.6.1
postgis |3.6.1
Le 08/01/2026 à 17:58, Regina Obe a écrit :
I can’t replicate on my PostgreSQL 17.7 either even with upgrading from PostGIS 3.5.3 to 3.6.1
PostgreSQL 17.7 on x86_64-windows, compiled by msvc-19.44.35221, 64-bit POSTGIS="3.6.1 3.6.1" [EXTENSION] PGSQL="170" GEOS="3.14.1-CAPI-1.20.5" PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=C:\Windows\ServiceProfiles\NetworkService\AppData\Local/proj <file:///C:/Windows/ServiceProfiles/NetworkService/AppData/Local/proj> DATABASE_PATH=C:\Program <file:///C:/Program> Files\PostgreSQL\18\share\contrib\postgis-3.6\proj\proj.db" (compiled against PROJ 8.2.1) LIBXML="2.12.5" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"
Perhaps you are having a conflict with another extension or it’s issue with upgrade from earlier. I recall we did have to fix an issue with =
Can you show what the below queries output:
SELECT oprcode, oprleft::regtype, oprright::regtype
FROM pg_catalog.pg_operator
WHERE oprname = '=' AND oprleft::regtype::text IN('geometry', 'geography')
ORDER BY oprleft, oprright;
Should be:
oprcode | oprleft | oprright
--------------+-----------+-----------
geometry_eq | geometry | geometry
geography_eq | geography | geography
(2 rows)
SELECT extname, extversion FROM pg_catalog.pg_extension;
From: Paul Ramsey via postgis-users <mailto:postgis-users at lists.osgeo.org> <postgis-users at lists.osgeo.org>
Sent: Thursday, January 8, 2026 11:26 AM
To: Cedric Duprez <mailto:cedric.duprez at ign.fr> <cedric.duprez at ign.fr>
Cc: postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>
Subject: Re: PostGIS 3.6.1 - ERROR: operator is not unique: public.geometry = public.geometry
This is odd, I am not able to replicate...
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
POSTGIS="3.6.1dev 3.6.0-6-gdb18a9a49" PGSQL="180" GEOS="3.15.0dev-CAPI-1.21.0" PROJ="9.3.0 NETWORK_ENABLED=ON URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/Users/pramsey/Library/Application Support/proj DATABASE_PATH=/usr/local/share/proj/proj.db" (compiled against PROJ 9.3.0) LIBXML="2.9.13" LIBJSON="0.17" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)"
(1 row)
postgis_reg=# SELECT 'POINT EMPTY'::public.geometry = 'POINT EMPTY'::public.geometry;
?column?
----------
t
(1 row)
Is this a database that has gone through upgrade stages, or a blank fresh database?
P
On Thu, Jan 8, 2026 at 8:21 AM Cedric Duprez <cedric.duprez at ign.fr <mailto:cedric.duprez at ign.fr> > wrote:
Hi all,
I'm facing a potential bug with PostGIS 3.6.1 on PostgreSQL 17.7.
Here is what I get with postgis_full_version() : POSTGIS="3.6.1 f533623" [EXTENSION] PGSQL="170" GEOS="3.12.1-CAPI-1.18.1" PROJ="9.4.0 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" (compiled against PROJ 9.4.0) GDAL="GDAL 3.8.4, released 2024/02/08" LIBXML="2.9.14" LIBJSON="0.17" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)" RASTER
When I execute this query:
SELECT 'POINT EMPTY'::public.geometry = 'POINT EMPTY'::public.geometry;
I get the following error:
ERROR: operator is not unique: public.geometry = public.geometry
It seems to be a regression, since I didn't have this error on previous versions of PostGIS (3.5).
How can this problem be solved?
Thanks in advance for you help,
Cedric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20260108/ce0af492/attachment.htm>
More information about the postgis-users
mailing list