You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "aru-d-at (via GitHub)" <gi...@apache.org> on 2023/04/26 23:52:27 UTC

[GitHub] [age] aru-d-at commented on issue #852: Which Tech/Algorithm is used to generate id automatically when creating new nodes and edges ?

aru-d-at commented on issue #852:
URL: https://github.com/apache/age/issues/852#issuecomment-1524225164

   Stepping through the code, it seems the Id is calculated through Postgres using the `stdlib-bsearch` library and calling function `bsearch()`.
   
   With the `ExecEvalStepOp` from _postgres/src/backend/executor/execExprInterp.c_ calling the function in multiple iterations to go through the existing Id's and evaluate the new Id's viability.
   
   The operation occurs similarly with the label_id's. Besides calling the previously mentioned function, it also calls the following (to name a few):
   * `_hash_any_` at _postgres/src/backend/utils/hashfn.c_
   * `_calc_bucket_` at _postgres/src/backend/utils/dynahash.c_


-- 
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: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org