Skip to content

Commit

Permalink
Fix for: Posgres expect a value false on nulls to be of type bool not…
Browse files Browse the repository at this point in the history
… of type char
  • Loading branch information
cvvergara committed Jan 8, 2017
1 parent 7d08b60 commit 6371dd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4444-604800991 trsp/v2.1.0
4445-7d08b60af trsp/v2.1.0
20 changes: 10 additions & 10 deletions src/trsp/src/trsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,19 +653,19 @@ turn_restrict_shortest_path_vertex(PG_FUNCTION_ARGS)
HeapTuple tuple;
Datum result;
Datum *values;
char* nulls;
bool* nulls;

values = palloc(4 * sizeof(Datum));
nulls = palloc(4 * sizeof(char));

values[0] = Int32GetDatum(call_cntr);
nulls[0] = ' ';
nulls[0] = false;
values[1] = Int32GetDatum(path[call_cntr].vertex_id);
nulls[1] = ' ';
nulls[1] = false;
values[2] = Int32GetDatum(path[call_cntr].edge_id);
nulls[2] = ' ';
nulls[2] = false;
values[3] = Float8GetDatum(path[call_cntr].cost);
nulls[3] = ' ';
nulls[3] = false;

tuple = heap_form_tuple(tuple_desc, values, nulls);

Expand Down Expand Up @@ -802,19 +802,19 @@ turn_restrict_shortest_path_edge(PG_FUNCTION_ARGS)
HeapTuple tuple;
Datum result;
Datum *values;
char* nulls;
bool* nulls;

values = palloc(4 * sizeof(Datum));
nulls = palloc(4 * sizeof(char));

values[0] = Int32GetDatum(call_cntr);
nulls[0] = ' ';
nulls[0] = false;
values[1] = Int32GetDatum(path[call_cntr].vertex_id);
nulls[1] = ' ';
nulls[1] = false;
values[2] = Int32GetDatum(path[call_cntr].edge_id);
nulls[2] = ' ';
nulls[2] = false;
values[3] = Float8GetDatum(path[call_cntr].cost);
nulls[3] = ' ';
nulls[3] = false;

tuple = heap_form_tuple(tuple_desc, values, nulls);

Expand Down

0 comments on commit 6371dd1

Please sign in to comment.