Git Product home page Git Product logo

Comments (9)

Zainab-Saad avatar Zainab-Saad commented on August 25, 2024 2

The error you are getting is because the operator -> is overloaded (in version 1.5.0) with the following possible operands
agtype -> agtype
agtype -> text
agtype -> int

In the query select properties->'ott' from ott_service_1.ott_company;, 'ott' is of the type unknown and when such a type is provided as second argument to the operator ->, postgres chooses the operator agtype -> agtype instead of agtype -> text. And 'ott' is not in valid agtype format (should be '"ott"'), so you get an error.

You can read why specific operator is choosen when unknown type is provided in the operator type resolution section here

from age.

shinhanbyeol avatar shinhanbyeol commented on August 25, 2024 1

@jrgemignani 1.5 ,1.4 Both were done in pg 14 version

from age.

Zainab-Saad avatar Zainab-Saad commented on August 25, 2024 1

@shinhanbyeol There appears to be something weird with the definition of ->
@Zainab-Saad Could you take a look?

Yes, looking into this

from age.

jrgemignani avatar jrgemignani commented on August 25, 2024

@shinhanbyeol What version of PG is this on, what version of PG did it previously work on?

from age.

jrgemignani avatar jrgemignani commented on August 25, 2024

@shinhanbyeol There appears to be something weird with the definition of ->
@Zainab-Saad Could you take a look?

from age.

jrgemignani avatar jrgemignani commented on August 25, 2024
psql-16.1-5432-pgsql=# select agtype_object_field(properties, 'name') from xyz._ag_label_vertex;
 agtype_object_field
---------------------
 "John"
(1 row)

psql-16.1-5432-pgsql=# select agtype_object_field_agtype(properties, 'name') from xyz._ag_label_vertex;
ERROR:  invalid input syntax for type agtype
LINE 1: select agtype_object_field_agtype(properties, 'name') from x...
                                                      ^
DETAIL:  Expected agtype value, but found "name".
CONTEXT:  agtype data, line 1: name
psql-16.1-5432-pgsql=#
psql-16.1-5432-pgsql=# select properties->'name' from xyz._ag_label_vertex;
ERROR:  invalid input syntax for type agtype
LINE 1: select properties->'name' from xyz._ag_label_vertex;
                           ^
DETAIL:  Expected agtype value, but found "name".
CONTEXT:  agtype data, line 1: name
psql-16.1-5432-pgsql=#

from age.

jrgemignani avatar jrgemignani commented on August 25, 2024

@Zainab-Saad Thank you!

from age.

github-actions avatar github-actions commented on August 25, 2024

This issue is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.

from age.

github-actions avatar github-actions commented on August 25, 2024

This issue was closed because it has been stalled for further 7 days with no activity.

from age.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.