Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/backend/utils/adt/age_global_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include "access/table.h"
#include "access/tableam.h"
#include "catalog/namespace.h"
#include "common/hashfn.h"
#include "commands/label_commands.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "commands/label_commands.h"
#include "common/hashfn.h"

#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
Expand Down Expand Up @@ -448,6 +448,8 @@ static void load_vertex_hashtable(GRAPH_global_context *ggctx)
/* get the vertex properties datum */
vertex_properties = column_get_datum(tupdesc, tuple, 1,
"properties", AGTYPEOID, true);
/* we need to make a copy of the properties datum */
vertex_properties = datumCopy(vertex_properties, false, -1);

/* insert vertex into vertex hashtable */
inserted = insert_vertex_entry(ggctx, vertex_id,
Expand Down Expand Up @@ -561,6 +563,9 @@ static void load_edge_hashtable(GRAPH_global_context *ggctx)
edge_properties = column_get_datum(tupdesc, tuple, 3, "properties",
AGTYPEOID, true);

/* we need to make a copy of the properties datum */
edge_properties = datumCopy(edge_properties, false, -1);

/* insert edge into edge hashtable */
inserted = insert_edge(ggctx, edge_id, edge_properties,
edge_vertex_start_id, edge_vertex_end_id,
Expand Down