RE: PostGIS 3.6.1 - ERROR: operator is not unique: public.geometry = public.geometry
"Regina Obe" <[email protected]> Thu, 8 Jan 2026 12:14:58 -0500
| Newsgroups | gmane.comp.gis.postgis |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format. ------=_NextPart_000_0032_01DC8098.68C07560 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cedric, =20 Good news. I was able to replicate. =20 I noticed in your output you have the fully qualified type name, which = means you don=E2=80=99t have postgis schema in your search path. =20 To replicate I did: =20 set search_path=3D'pg_catalog'; SELECT 'POINT EMPTY'::public.geometry =3D 'POINT = EMPTY'::public.geometry; =20 =20 Gives: =20 ERROR: operator is not unique: public.geometry =3D public.geometry LINE = 1: SELECT 'POINT EMPTY'::public.geometry =3D 'POINT EMPTY'::publi... ^ =20 =20 So I=E2=80=99m guessing we have some code in our =3D path that is not = schema qualified. =20 I=E2=80=99ve ticketed the issue here: =20 https://trac.osgeo.org/postgis/ticket/6033 =20 Paul, Can you confirm you can replicate by changing your search_path? =20 =20 =20 =20 From: Cedric Duprez <[email protected]>=20 Sent: Thursday, January 8, 2026 12:05 PM To: Regina Obe <[email protected]>; 'Paul Ramsey' <[email protected]> Cc: [email protected] Subject: Re: PostGIS 3.6.1 - ERROR: operator is not unique: = public.geometry =3D public.geometry =20 I get two lines with the following query: SELECT oprcode, oprleft::regtype, oprright::regtype FROM pg_catalog.pg_operator WHERE oprname =3D '=3D' AND oprleft::regtype::text IN('public.geometry', = 'public.geography') ORDER BY oprleft, oprright; Query result: oprcode |oprleft |oprright =20 -------------------+----------------+---------------- public.geometry_eq |public.geometry |public.geometry=20 public.geography_eq|public.geography|public.geography Extensions are : extname |extversion ------------------+---------- plpgsql |1.0 =20 ogr_fdw |1.1 =20 plr |8.4.8.2 =20 pg_stat_statements|1.11 =20 pgcrypto |1.3 =20 tablefunc |1.0 =20 postgis_raster |3.6.1 =20 postgis |3.6.1 =20 Le 08/01/2026 =C3=A0 17:58, Regina Obe a =C3=A9crit : I can=E2=80=99t replicate on my PostgreSQL 17.7 either even with = upgrading from PostGIS 3.5.3 to 3.6.1 =20 PostgreSQL 17.7 on x86_64-windows, compiled by msvc-19.44.35221, 64-bit = POSTGIS=3D"3.6.1 3.6.1" [EXTENSION] PGSQL=3D"170" = GEOS=3D"3.14.1-CAPI-1.20.5" PROJ=3D"8.2.1 NETWORK_ENABLED=3DOFF = URL_ENDPOINT=3Dhttps://cdn.proj.org = USER_WRITABLE_DIRECTORY=3DC:\Windows\ServiceProfiles\NetworkService\AppDa= ta\Local/proj = <file:///C:/Windows/ServiceProfiles/NetworkService/AppData/Local/proj> = DATABASE_PATH=3DC:\Program <file:///C:/Program> = Files\PostgreSQL\18\share\contrib\postgis-3.6\proj\proj.db" (compiled = against PROJ 8.2.1) LIBXML=3D"2.12.5" LIBJSON=3D"0.12" = LIBPROTOBUF=3D"1.2.1" WAGYU=3D"0.5.0 (Internal)" =20 Perhaps you are having a conflict with another extension or it=E2=80=99s = issue with upgrade from earlier. I recall we did have to fix an issue = with =3D=20 =20 Can you show what the below queries output: =20 SELECT oprcode, oprleft::regtype, oprright::regtype=20 FROM pg_catalog.pg_operator=20 WHERE oprname =3D '=3D' AND oprleft::regtype::text IN('geometry', = 'geography') ORDER BY oprleft, oprright; =20 Should be: =20 oprcode | oprleft | oprright --------------+-----------+----------- geometry_eq | geometry | geometry geography_eq | geography | geography (2 rows) =20 =20 SELECT extname, extversion FROM pg_catalog.pg_extension; =20 =20 =20 =20 From: Paul Ramsey via postgis-users = <mailto:[email protected]> <[email protected]>=20 Sent: Thursday, January 8, 2026 11:26 AM To: Cedric Duprez <mailto:[email protected]> <[email protected]> Cc: [email protected] <mailto:[email protected]> = Subject: Re: PostGIS 3.6.1 - ERROR: operator is not unique: = public.geometry =3D public.geometry =20 This is odd, I am not able to replicate... =20 -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= --- POSTGIS=3D"3.6.1dev 3.6.0-6-gdb18a9a49" PGSQL=3D"180" = GEOS=3D"3.15.0dev-CAPI-1.21.0" PROJ=3D"9.3.0 NETWORK_ENABLED=3DON = URL_ENDPOINT=3Dhttps://cdn.proj.org = USER_WRITABLE_DIRECTORY=3D/Users/pramsey/Library/Application = Support/proj DATABASE_PATH=3D/usr/local/share/proj/proj.db" (compiled = against PROJ 9.3.0) LIBXML=3D"2.9.13" LIBJSON=3D"0.17" = LIBPROTOBUF=3D"1.4.1" WAGYU=3D"0.5.0 (Internal)" (1 row) postgis_reg=3D# SELECT 'POINT EMPTY'::public.geometry =3D 'POINT = EMPTY'::public.geometry; ?column?=20 ---------- t (1 row) =20 =20 Is this a database that has gone through upgrade stages, or a blank = fresh database? =20 P =20 On Thu, Jan 8, 2026 at 8:21=E2=80=AFAM Cedric Duprez = <[email protected] <mailto:[email protected]> > 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=3D"3.6.1 = f533623" [EXTENSION] PGSQL=3D"170" GEOS=3D"3.12.1-CAPI-1.18.1" = PROJ=3D"9.4.0 NETWORK_ENABLED=3DOFF URL_ENDPOINT=3Dhttps://cdn.proj.org = USER_WRITABLE_DIRECTORY=3D/tmp/proj = DATABASE_PATH=3D/usr/share/proj/proj.db" (compiled against PROJ 9.4.0) = GDAL=3D"GDAL 3.8.4, released 2024/02/08" LIBXML=3D"2.9.14" = LIBJSON=3D"0.17" LIBPROTOBUF=3D"1.4.1" WAGYU=3D"0.5.0 (Internal)" RASTER When I execute this query:=20 SELECT 'POINT EMPTY'::public.geometry =3D 'POINT = EMPTY'::public.geometry; I get the following error: ERROR: operator is not unique: public.geometry =3D 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=20 =20 ------=_NextPart_000_0032_01DC8098.68C07560 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta = http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta = name=3DGenerator content=3D"Microsoft Word 15 (filtered = medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Aptos;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:12.0pt; font-family:"Aptos",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} span.EmailStyle19 {mso-style-type:personal-reply; font-family:"Aptos",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt; mso-ligatures:none;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style></head><body lang=3DEN-US link=3Dblue vlink=3Dpurple = style=3D'word-wrap:break-word'><div class=3DWordSection1><p = class=3DMsoNormal>Cedric,<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Good = news.=C2=A0 I was able to replicate.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>I noticed in = your output you have the fully qualified type name, which means you = don=E2=80=99t have postgis schema in your search path.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>To replicate = I did:<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal>set search_path=3D'pg_catalog';<o:p></o:p></p><p = class=3DMsoNormal>SELECT 'POINT EMPTY'::public.geometry =3D 'POINT = EMPTY'::public.geometry;<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal>Gives:<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>ERROR: = operator is not unique: public.geometry =3D public.geometry LINE 1: = SELECT 'POINT EMPTY'::public.geometry =3D 'POINT EMPTY'::publi... = ^<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>So = I=E2=80=99m guessing we have some code in our =3D path that is not = schema qualified.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>I=E2=80=99ve = ticketed the issue here:<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><a = href=3D"https://trac.osgeo.org/postgis/ticket/6033">https://trac.osgeo.or= g/postgis/ticket/6033</a><o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal>Paul,<o:p></o:p></p><p class=3DMsoNormal>Can you = confirm you can replicate by changing your search_path?<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><div = style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in = 4.0pt'><div><div style=3D'border:none;border-top:solid #E1E1E1 = 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span = style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><= /b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> = Cedric Duprez <[email protected]> <br><b>Sent:</b> Thursday, = January 8, 2026 12:05 PM<br><b>To:</b> Regina Obe <[email protected]>; = 'Paul Ramsey' <[email protected]><br><b>Cc:</b> = [email protected]<br><b>Subject:</b> Re: PostGIS 3.6.1 - = ERROR: operator is not unique: public.geometry =3D = public.geometry<o:p></o:p></span></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal = style=3D'margin-bottom:12.0pt'>I get two lines with the following = query:<br><br>SELECT oprcode, <a = href=3D"oprleft::regtype">oprleft::regtype</a>, <a = href=3D"oprright::regtype">oprright::regtype</a><br>FROM = pg_catalog.pg_operator<br>WHERE oprname =3D '=3D' AND <a = href=3D"oprleft::regtype::text">oprleft::regtype::text</a> = IN('public.geometry', 'public.geography')<br>ORDER BY oprleft, = oprright;<br><br>Query result:<br><br>oprcode = |oprleft |oprright = = <br>-------------------+----------------+----------------<br>= public.geometry_eq |public.geometry = |public.geometry <br>public.geography_eq|public.geography|public.geo= graphy<br><br>Extensions are :<br><br>extname = = |extversion<br>------------------+----------<br>plpgsql = |1.0 = <br>ogr_fdw |1.1 = <br>plr = |8.4.8.2 <br>pg_stat_statements|1.11 = <br>pgcrypto = |1.3 <br>tablefunc = |1.0 <br>postgis_raster = |3.6.1 <br>postgis = |3.6.1 <o:p></o:p></p><div><p = class=3DMsoNormal>Le 08/01/2026 =C3=A0 17:58, Regina Obe a = =C3=A9crit :<o:p></o:p></p></div><blockquote = style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p class=3DMsoNormal>I = can=E2=80=99t replicate on my PostgreSQL 17.7 either even with upgrading = from PostGIS 3.5.3 to 3.6.1<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>PostgreSQL = 17.7 on x86_64-windows, compiled by msvc-19.44.35221, 64-bit = POSTGIS=3D"3.6.1 3.6.1" [EXTENSION] PGSQL=3D"170" = GEOS=3D"3.14.1-CAPI-1.20.5" PROJ=3D"8.2.1 = NETWORK_ENABLED=3DOFF URL_ENDPOINT=3D<a = href=3D"https://cdn.proj.org">https://cdn.proj.org</a> = USER_WRITABLE_DIRECTORY=3D<a = href=3D"file:///C:/Windows/ServiceProfiles/NetworkService/AppData/Local/p= roj">C:\Windows\ServiceProfiles\NetworkService\AppData\Local/proj</a> = DATABASE_PATH=3D<a href=3D"file:///C:/Program">C:\Program</a> = Files\PostgreSQL\18\share\contrib\postgis-3.6\proj\proj.db" = (compiled against PROJ 8.2.1) LIBXML=3D"2.12.5" = LIBJSON=3D"0.12" LIBPROTOBUF=3D"1.2.1" = WAGYU=3D"0.5.0 (Internal)"<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>Perhaps you = are having a conflict with another extension or it=E2=80=99s issue with = upgrade from earlier. I recall we did have to fix an issue with = =3D <o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal>Can you show what the below queries = output:<o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal>SELECT oprcode, <a = href=3D"oprleft::regtype">oprleft::regtype</a>, <a = href=3D"oprright::regtype">oprright::regtype</a> <o:p></o:p></p><p = class=3DMsoNormal>FROM pg_catalog.pg_operator <o:p></o:p></p><p = class=3DMsoNormal>WHERE oprname =3D '=3D' AND <a = href=3D"oprleft::regtype::text">oprleft::regtype::text</a> = IN('geometry', 'geography')<o:p></o:p></p><p class=3DMsoNormal>ORDER BY = oprleft, oprright;<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>Should = be:<o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal> oprcode | = oprleft | oprright<o:p></o:p></p><p = class=3DMsoNormal>--------------+-----------+-----------<o:p></o:p></p><p= class=3DMsoNormal>geometry_eq | geometry | = geometry<o:p></o:p></p><p class=3DMsoNormal>geography_eq | geography | = geography<o:p></o:p></p><p class=3DMsoNormal>(2 rows)<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>SELECT = extname, extversion FROM pg_catalog.pg_extension;<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><div = style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in = 4.0pt'><div><div style=3D'border:none;border-top:solid #E1E1E1 = 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span = style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><= /b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> = Paul Ramsey via postgis-users <a = href=3D"mailto:[email protected]"><[email protected]= eo.org></a> <br><b>Sent:</b> Thursday, January 8, 2026 11:26 = AM<br><b>To:</b> Cedric Duprez <a = href=3D"mailto:[email protected]"><[email protected]></a><br>= <b>Cc:</b> <a = href=3D"mailto:[email protected]">[email protected]= rg</a><br><b>Subject:</b> Re: PostGIS 3.6.1 - ERROR: operator is not = unique: public.geometry =3D = public.geometry</span><o:p></o:p></p></div></div><p = class=3DMsoNormal> <o:p></o:p></p><div><p class=3DMsoNormal>This is = odd, I am not able to replicate...<o:p></o:p></p><div><p = class=3DMsoNormal> <o:p></o:p></p></div><div><p = class=3DMsoNormal>-------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= ---------------------<br> POSTGIS=3D"3.6.1dev = 3.6.0-6-gdb18a9a49" PGSQL=3D"180" = GEOS=3D"3.15.0dev-CAPI-1.21.0" PROJ=3D"9.3.0 = NETWORK_ENABLED=3DON URL_ENDPOINT=3D<a = href=3D"https://cdn.proj.org">https://cdn.proj.org</a> = USER_WRITABLE_DIRECTORY=3D/Users/pramsey/Library/Application = Support/proj DATABASE_PATH=3D/usr/local/share/proj/proj.db" = (compiled against PROJ 9.3.0) LIBXML=3D"2.9.13" = LIBJSON=3D"0.17" LIBPROTOBUF=3D"1.4.1" = WAGYU=3D"0.5.0 (Internal)"<br>(1 row)<br><br>postgis_reg=3D# = SELECT 'POINT EMPTY'::public.geometry =3D 'POINT = EMPTY'::public.geometry;<br> ?column? = <br>----------<br> t<br>(1 row)<o:p></o:p></p></div><div><p = class=3DMsoNormal> <o:p></o:p></p></div><div><p = class=3DMsoNormal> <o:p></o:p></p></div><div><p = class=3DMsoNormal>Is this a database that has gone through upgrade = stages, or a blank fresh database?<o:p></o:p></p></div><div><p = class=3DMsoNormal> <o:p></o:p></p></div><div><p = class=3DMsoNormal>P<o:p></o:p></p></div></div><p = class=3DMsoNormal> <o:p></o:p></p><div><div><p class=3DMsoNormal>On = Thu, Jan 8, 2026 at 8:21<span = style=3D'font-family:"Arial",sans-serif'>=E2=80=AF</span>AM Cedric = Duprez <<a = href=3D"mailto:[email protected]">[email protected]</a>> = wrote:<o:p></o:p></p></div><blockquote = style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in = 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5= .0pt'><div><p class=3DMsoNormal>Hi all,<br><br>I'm facing a potential = bug with PostGIS 3.6.1 on PostgreSQL 17.7.<br>Here is what I get with = postgis_full_version() : POSTGIS=3D"3.6.1 f533623" = [EXTENSION] PGSQL=3D"170" = GEOS=3D"3.12.1-CAPI-1.18.1" PROJ=3D"9.4.0 = NETWORK_ENABLED=3DOFF URL_ENDPOINT=3D<a href=3D"https://cdn.proj.org" = target=3D"_blank">https://cdn.proj.org</a> = USER_WRITABLE_DIRECTORY=3D/tmp/proj = DATABASE_PATH=3D/usr/share/proj/proj.db" (compiled against PROJ = 9.4.0) GDAL=3D"GDAL 3.8.4, released 2024/02/08" = LIBXML=3D"2.9.14" LIBJSON=3D"0.17" = LIBPROTOBUF=3D"1.4.1" WAGYU=3D"0.5.0 (Internal)" = RASTER<br><br>When I execute this query: <br>SELECT 'POINT = EMPTY'::public.geometry =3D 'POINT EMPTY'::public.geometry;<br>I get the = following error:<br>ERROR: operator is not unique: public.geometry =3D = public.geometry<br><br>It seems to be a regression, since I didn't have = this error on previous versions of PostGIS (3.5).<br><br>How can this = problem be solved?<br>Thanks in advance for you help,<br><br>Cedric = <o:p></o:p></p></div></blockquote></div></div></blockquote><p = class=3DMsoNormal><o:p> </o:p></p></div></div></body></html> ------=_NextPart_000_0032_01DC8098.68C07560--