继续分析
load_plpgsql();
展开:
就是让postgres 执行 create extension plpgsql
cmd是:
"/home/pgsql/project/bin/postgres" --single -F -O -c search_path=pg_catalog -c exit_on_error=true template1 >/dev/null
ok
/* * load PL/pgsql server-side language */ static void load_plpgsql(void) { PG_CMD_DECL; fputs(_("loading PL/pgSQL server-side language ... "), stdout); fflush(stdout); snprintf(cmd, sizeof(cmd), ""%s" %s template1 >%s", backend_exec, backend_options, DEVNULL); PG_CMD_OPEN; PG_CMD_PUTS("CREATE EXTENSION plpgsql; "); PG_CMD_CLOSE; check_ok(); }