Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
2 added 2 characters in body
source | link

Apparently, I somehow got confused about extensions.

It appeared that everything is much simpler: I just copied compiled dll to postgresql lib folder and everything worked.

Detailed information about how to compile PostgreSQL extensions on Windows can be found here: https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/ I'd

I'd like to add a note about PGDLLEXPORT. For extensions to work you should add PGDLLEXPORT before two procedures: _PG_init and _PG_output_plugin_init. So code will look like:

PGDLLEXPORT extern void     _PG_init(void);
PGDLLEXPORT extern void     _PG_output_plugin_init(OutputPluginCallbacks *cb);

Apparently, I somehow got confused about extensions.

It appeared that everything is much simpler: I just copied compiled dll to postgresql lib folder and everything worked.

Detailed information about how to compile PostgreSQL extensions on Windows can be found here: https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/ I'd like to add a note about PGDLLEXPORT. For extensions to work you should add PGDLLEXPORT before two procedures: _PG_init and _PG_output_plugin_init. So code will look like:

PGDLLEXPORT extern void     _PG_init(void);
PGDLLEXPORT extern void     _PG_output_plugin_init(OutputPluginCallbacks *cb);

Apparently, I somehow got confused about extensions.

It appeared that everything is much simpler: I just copied compiled dll to postgresql lib folder and everything worked.

Detailed information about how to compile PostgreSQL extensions on Windows can be found here: https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/

I'd like to add a note about PGDLLEXPORT. For extensions to work you should add PGDLLEXPORT before two procedures: _PG_init and _PG_output_plugin_init. So code will look like:

PGDLLEXPORT extern void     _PG_init(void);
PGDLLEXPORT extern void     _PG_output_plugin_init(OutputPluginCallbacks *cb);
1
source | link

Apparently, I somehow got confused about extensions.

It appeared that everything is much simpler: I just copied compiled dll to postgresql lib folder and everything worked.

Detailed information about how to compile PostgreSQL extensions on Windows can be found here: https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/ I'd like to add a note about PGDLLEXPORT. For extensions to work you should add PGDLLEXPORT before two procedures: _PG_init and _PG_output_plugin_init. So code will look like:

PGDLLEXPORT extern void     _PG_init(void);
PGDLLEXPORT extern void     _PG_output_plugin_init(OutputPluginCallbacks *cb);