Skip to content

Commit

Permalink
Fix generic WAL messages
Browse files Browse the repository at this point in the history
As spotted in issue yugabyte#28, I committed a code that was not supposed to be
part of the original commit 645ab69.

Thanks to Julien Rouhaud (@rjuju) to bring it up.
  • Loading branch information
Euler Taveira committed Oct 11, 2017
1 parent 645ab69 commit c196c32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wal2json.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,11 +972,11 @@ pg_decode_message(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
else
appendStringInfoString(ctx->out, "\"transactional\":false,");

appendStringInfo(ctx->out, "\"prefix\":");
quote_escape_json(ctx->out, prefix);
appendStringInfo(ctx->out, "\"prefix\":\"%s\"", prefix);
appendStringInfoChar(ctx->out, ',');
appendStringInfoString(ctx->out, "\"content\":");
quote_escape_json(ctx->out, content);
appendStringInfoString(ctx->out, "\"content\":\"");
appendBinaryStringInfo(ctx->out, content, content_size);
appendStringInfoChar(ctx->out, '"');
appendStringInfoChar(ctx->out, '}');

/* build a complete JSON object for non-transactional message */
Expand Down

0 comments on commit c196c32

Please sign in to comment.