Postgres: ERROR: operator does not exist: point point












0















Using PostgreSQL 11 on Windows.



Both cube and earthdistance installed and verified by pg_available_extensions.



Restarted PostgreSQL.



[42883] ERROR: operator does not exist: point <@> point.



Tried the following code from StackOverflow



create table temp.lat_lon (
city varchar(50) primary key,
lat float8 not null,
lon float8 not null
);

insert into temp.lat_lon values
('London, GB', 51.67234320, 0.14787970),
('New York, NY', 40.91524130, -73.7002720);

select
(
(select point(lon,lat) from temp.lat_lon where city = 'London, GB') <@>
(select point(lon,lat) from temp.lat_lon where city = 'New York, NY')
) as distance_miles;


Throws:
[42883] ERROR: operator does not exist: point <@> point.



Extensions installed and Postgres was restarted.



select * from pg_available_extensions where name IN ('cube', 'earthdistance');



cube            1.4     data type for multidimensional cubes
earthdistance 1.1 calculate great-circle distances on the surface of the Earth


Is this because of PostgreSQL v11 on Windows?
Yes Lat/Long in correct order (long is first)



Note: Table F.6 Point-based Earthdistance Operators
https://www.postgresql.org/docs/11/earthdistance.html









share



























    0















    Using PostgreSQL 11 on Windows.



    Both cube and earthdistance installed and verified by pg_available_extensions.



    Restarted PostgreSQL.



    [42883] ERROR: operator does not exist: point <@> point.



    Tried the following code from StackOverflow



    create table temp.lat_lon (
    city varchar(50) primary key,
    lat float8 not null,
    lon float8 not null
    );

    insert into temp.lat_lon values
    ('London, GB', 51.67234320, 0.14787970),
    ('New York, NY', 40.91524130, -73.7002720);

    select
    (
    (select point(lon,lat) from temp.lat_lon where city = 'London, GB') <@>
    (select point(lon,lat) from temp.lat_lon where city = 'New York, NY')
    ) as distance_miles;


    Throws:
    [42883] ERROR: operator does not exist: point <@> point.



    Extensions installed and Postgres was restarted.



    select * from pg_available_extensions where name IN ('cube', 'earthdistance');



    cube            1.4     data type for multidimensional cubes
    earthdistance 1.1 calculate great-circle distances on the surface of the Earth


    Is this because of PostgreSQL v11 on Windows?
    Yes Lat/Long in correct order (long is first)



    Note: Table F.6 Point-based Earthdistance Operators
    https://www.postgresql.org/docs/11/earthdistance.html









    share

























      0












      0








      0








      Using PostgreSQL 11 on Windows.



      Both cube and earthdistance installed and verified by pg_available_extensions.



      Restarted PostgreSQL.



      [42883] ERROR: operator does not exist: point <@> point.



      Tried the following code from StackOverflow



      create table temp.lat_lon (
      city varchar(50) primary key,
      lat float8 not null,
      lon float8 not null
      );

      insert into temp.lat_lon values
      ('London, GB', 51.67234320, 0.14787970),
      ('New York, NY', 40.91524130, -73.7002720);

      select
      (
      (select point(lon,lat) from temp.lat_lon where city = 'London, GB') <@>
      (select point(lon,lat) from temp.lat_lon where city = 'New York, NY')
      ) as distance_miles;


      Throws:
      [42883] ERROR: operator does not exist: point <@> point.



      Extensions installed and Postgres was restarted.



      select * from pg_available_extensions where name IN ('cube', 'earthdistance');



      cube            1.4     data type for multidimensional cubes
      earthdistance 1.1 calculate great-circle distances on the surface of the Earth


      Is this because of PostgreSQL v11 on Windows?
      Yes Lat/Long in correct order (long is first)



      Note: Table F.6 Point-based Earthdistance Operators
      https://www.postgresql.org/docs/11/earthdistance.html









      share














      Using PostgreSQL 11 on Windows.



      Both cube and earthdistance installed and verified by pg_available_extensions.



      Restarted PostgreSQL.



      [42883] ERROR: operator does not exist: point <@> point.



      Tried the following code from StackOverflow



      create table temp.lat_lon (
      city varchar(50) primary key,
      lat float8 not null,
      lon float8 not null
      );

      insert into temp.lat_lon values
      ('London, GB', 51.67234320, 0.14787970),
      ('New York, NY', 40.91524130, -73.7002720);

      select
      (
      (select point(lon,lat) from temp.lat_lon where city = 'London, GB') <@>
      (select point(lon,lat) from temp.lat_lon where city = 'New York, NY')
      ) as distance_miles;


      Throws:
      [42883] ERROR: operator does not exist: point <@> point.



      Extensions installed and Postgres was restarted.



      select * from pg_available_extensions where name IN ('cube', 'earthdistance');



      cube            1.4     data type for multidimensional cubes
      earthdistance 1.1 calculate great-circle distances on the surface of the Earth


      Is this because of PostgreSQL v11 on Windows?
      Yes Lat/Long in correct order (long is first)



      Note: Table F.6 Point-based Earthdistance Operators
      https://www.postgresql.org/docs/11/earthdistance.html







      postgresql postgresql-11





      share












      share










      share



      share










      asked 6 mins ago









      thamesthames

      1061




      1061






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231411%2fpostgres-error-operator-does-not-exist-point-point%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231411%2fpostgres-error-operator-does-not-exist-point-point%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          ف. موراي أبراهام

          صرب

          كأس إنترتوتو