mirror of
https://github.com/postgres/postgres.git
synced 2025-10-18 04:29:09 +03:00
pgoutput: Initialize missing default for "origin" parameter.
The pgoutput plugin initializes optional parameters like "binary" with default values at the start of processing. However, the "origin" parameter was previously missed and left without explicit initialization. Although the PGOutputData struct, which holds these settings, is zero-initialized at allocation (resulting in publish_no_origin field for "origin" parameter being false by default), this default was not set explicitly, unlike other parameters. This commit adds explicit initialization of the "origin" parameter to ensure consistency and clarity in how defaults are handled. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Euler Taveira <euler@eulerto.com> Discussion: https://postgr.es/m/d2790f10-238d-4cb5-a743-d9d2a9dd900f@oss.nttdata.com
This commit is contained in:
@@ -297,10 +297,12 @@ parse_output_parameters(List *options, PGOutputData *data)
|
||||
bool two_phase_option_given = false;
|
||||
bool origin_option_given = false;
|
||||
|
||||
/* Initialize optional parameters to defaults */
|
||||
data->binary = false;
|
||||
data->streaming = LOGICALREP_STREAM_OFF;
|
||||
data->messages = false;
|
||||
data->two_phase = false;
|
||||
data->publish_no_origin = false;
|
||||
|
||||
foreach(lc, options)
|
||||
{
|
||||
|
Reference in New Issue
Block a user