Home > Back-end >  Compiling PostgreSQL extension, getting "error: ‘work_mem’ undeclared (first use in this functi
Compiling PostgreSQL extension, getting "error: ‘work_mem’ undeclared (first use in this functi

Time:11-03

When I compile the extension I've got, I'm getting

error: ‘work_mem’ undeclared (first use in this function)
   17 |   Tuplestorestate *tupstore = tuplestore_begin_heap(true, false, work_mem);

What header includes work_mem?

CodePudding user response:

The work_mem symbol is provided by misadmin.h you will have to add that header into your .c file.

#include "miscadmin.h"
  • Related