1 /*------------------------------------------------------------------------- 2 * 3 * pglogical_output.c 4 * Logical Replication output plugin which just loads and forwards 5 * the call to the pglogical. 6 * 7 * This exists for backwards compatibility. 8 * 9 * Copyright (c) 2012-2015, PostgreSQL Global Development Group 10 * 11 * IDENTIFICATION 12 * pglogical_output.c 13 * 14 *------------------------------------------------------------------------- 15 */ 16 #include "postgres.h" 17 18 #include "replication/logical.h" 19 20 PG_MODULE_MAGIC; 21 22 extern void _PG_output_plugin_init(OutputPluginCallbacks *cb); 23 24 void _PG_output_plugin_init(OutputPluginCallbacks * cb)25_PG_output_plugin_init(OutputPluginCallbacks *cb) 26 { 27 LogicalOutputPluginInit plugin_init; 28 29 AssertVariableIsOfType(&_PG_output_plugin_init, LogicalOutputPluginInit); 30 31 plugin_init = (LogicalOutputPluginInit) 32 load_external_function("pglogical", "_PG_output_plugin_init", false, NULL); 33 34 if (plugin_init == NULL) 35 elog(ERROR, "could not load pglogical output plugin"); 36 37 plugin_init(cb); 38 } 39