nikoraes opened a new issue, #2234:
URL: https://github.com/apache/age/issues/2234

   **Describe the bug**
   In 1.5.0 it's possible to directly convert a json object string into an 
agtype object within a Cypher query.
   In 1.6.0, this results in _ERROR:  scalar object must be a vertex or edge_ 
   
   As a workaround, first converting to jsonb and then to agtype works, but 
then I'm having issues with big numbers.
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - pgadmin for debugging
   - [custom .NET driver](https://github.com/konnektr-io/npgsql-age)
   
   **What data setup do we need to do?**
   ```pgsql
   SELECT * FROM cypher('graphname', $$ 
   WITH '{"bignumber":5e24}'::agtype as obj
   RETURN obj.bignumber
   $$) as (result agtype);
   ```
   
   This returns 5e+24 in 1.5.0.
   in 1.6.0, this fails with ERROR:  scalar object must be a vertex or edge 
   
   I'm currently using the following workaround, which works mostly, but not in 
this specific case with the large number.
   ```pgsql
   SELECT * FROM cypher('graphname', $$ 
   WITH '{"bignumber":5e24}'::jsonb::agtype as obj
   RETURN obj.bignumber
   $$) as (result agtype);
   ```
   This results in this error (but is not really related to AGE I believe). 
   ERROR:  value "5000000000000000000000000" is out of range for type bigint 
   
   **What is the necessary configuration info needed?**
   **PG16**
   - 1.5.0 is running on bookworm
   - 1.6.0 is running on trixie
   
   **Expected behavior**
   I expect the same behavior in 1.6.0 as in 1.5.0, or at least a good 
workaround.
   
   **Environment (please complete the following information):**
   - Version: PG16, AGE 1.6.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to