PG::UndefinedFunction: ERROR: operator does not exist: character varying @> point

Jake

I have a Rails app and am running this query:

partner_found = Partner.find_by("partners.geo_polygon @> point '(:lat,:lng)'", lat: latitude, lng: longitude)

In my dev environment this runs fine, but in test it throws an error:

PG::UndefinedFunction: ERROR: operator does not exist: character varying @> point

Both my dev and test environments are running Postgres databases. What am I missing?

edit: More info, my test database created the geo_polygon columns as character varying while it is correctly polygon in the development database.

Jake

Thanks Rahul! The test database was missing hstore. I turned it on is psql with CREATE EXTENSION IF NOT EXISTS hstore;

I also added to my migration: enable_extension "hstore"

Also I found these answers at http://nandovieira.com/using-postgresql-and-hstore-with-rails

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Rails 4.1. Heroku ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: numeric - character varying

From Dev

Getting PG::UndefinedFunction: ERROR: operator does not exist: integer ~~* integer

From Dev

In Rails, Ransack search gives the error `PG::UndefinedFunction: ERROR: operator does not exist` when trying to filter by ID

From Dev

ActionView::Template::Error (PG::UndefinedFunction: ERROR: operator does not exist: integer ~~ unknown

From Dev

In Rails, Ransack search gives the error `PG::UndefinedFunction: ERROR: operator does not exist` when trying to filter by ID

From Java

PostgreSQL: ERROR: operator does not exist: integer = character varying

From Dev

ERROR: operator does not exist: integer = character varying, using Postgres 8.2

From Dev

PG::UndefinedFunction: ERROR LIKE operator

From Dev

PG::UndefinedFunction: ERROR LIKE operator

From Dev

Django - Error selecting objects: "ProgrammingError: operator does not exist: character varying = integer)

From Dev

Django and Postgresql operator does not exist: integer = character varying

From Dev

"operator does not exist character varying = bigint" in GnuHealth project

From Dev

"operator does not exist character varying = bigint" in GnuHealth project

From Dev

PG::UndefinedFunction: ERROR: function get_nearest_vertex_to_lon_lat(double precision, double precision) does not exist

From Dev

Getting PG::UndefinedFunction: ERROR in production

From Dev

Pg:Error column does not exist

From Dev

Postgres Warning: pg_query(): Query failed: ERROR: operator does not exist: boolean = integer LINE 1

From Dev

Rails: PG::UndefinedTable: ERROR: relation "..." does not exist

From Dev

PG::UndefinedTable: ERROR: relation does not exist

From Dev

PG::UndefinedTable: ERROR: relation "musicians" does not exist

From Dev

Sidekiq PG::UndefinedColumn: ERROR: does not exist

From Dev

PG::UndefinedTable: ERROR: relation 'caves' does not exist

From Dev

ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)

From Dev

ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)

From Dev

PG::UndefinedObject: ERROR: type "hstore" does not exist but it does

From Dev

ActionView::Template::Error (PG::UndefinedColumn: ERROR: column "weeknumber" does not exist

From Java

ERROR: operator does not exist with custom domain

From Dev

Error: operator does not exist: bit = integer

From Dev

ERROR: operator does not exist: numeric ~* unknown

Related Related

  1. 1

    Rails 4.1. Heroku ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: numeric - character varying

  2. 2

    Getting PG::UndefinedFunction: ERROR: operator does not exist: integer ~~* integer

  3. 3

    In Rails, Ransack search gives the error `PG::UndefinedFunction: ERROR: operator does not exist` when trying to filter by ID

  4. 4

    ActionView::Template::Error (PG::UndefinedFunction: ERROR: operator does not exist: integer ~~ unknown

  5. 5

    In Rails, Ransack search gives the error `PG::UndefinedFunction: ERROR: operator does not exist` when trying to filter by ID

  6. 6

    PostgreSQL: ERROR: operator does not exist: integer = character varying

  7. 7

    ERROR: operator does not exist: integer = character varying, using Postgres 8.2

  8. 8

    PG::UndefinedFunction: ERROR LIKE operator

  9. 9

    PG::UndefinedFunction: ERROR LIKE operator

  10. 10

    Django - Error selecting objects: "ProgrammingError: operator does not exist: character varying = integer)

  11. 11

    Django and Postgresql operator does not exist: integer = character varying

  12. 12

    "operator does not exist character varying = bigint" in GnuHealth project

  13. 13

    "operator does not exist character varying = bigint" in GnuHealth project

  14. 14

    PG::UndefinedFunction: ERROR: function get_nearest_vertex_to_lon_lat(double precision, double precision) does not exist

  15. 15

    Getting PG::UndefinedFunction: ERROR in production

  16. 16

    Pg:Error column does not exist

  17. 17

    Postgres Warning: pg_query(): Query failed: ERROR: operator does not exist: boolean = integer LINE 1

  18. 18

    Rails: PG::UndefinedTable: ERROR: relation "..." does not exist

  19. 19

    PG::UndefinedTable: ERROR: relation does not exist

  20. 20

    PG::UndefinedTable: ERROR: relation "musicians" does not exist

  21. 21

    Sidekiq PG::UndefinedColumn: ERROR: does not exist

  22. 22

    PG::UndefinedTable: ERROR: relation 'caves' does not exist

  23. 23

    ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)

  24. 24

    ActiveRecord::StatementInvalid (PG::Error: ERROR: value too long for type character varying(255)

  25. 25

    PG::UndefinedObject: ERROR: type "hstore" does not exist but it does

  26. 26

    ActionView::Template::Error (PG::UndefinedColumn: ERROR: column "weeknumber" does not exist

  27. 27

    ERROR: operator does not exist with custom domain

  28. 28

    Error: operator does not exist: bit = integer

  29. 29

    ERROR: operator does not exist: numeric ~* unknown

HotTag

Archive