Skip to content

Commit 6ca625f

Browse files
committed
fix build for PostgreSQL 19 (master)
1 parent 419d6ab commit 6ca625f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/profiler.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,17 @@ PG_FUNCTION_INFO_V1(plpgsql_profiler_remove_fake_queryid_hook);
192192
static void update_persistent_profile(profiler_info *pinfo, PLpgSQL_function *func, const int *stmtid_map);
193193
static PLpgSQL_expr *profiler_get_expr(PLpgSQL_stmt *stmt, bool *dynamic, List **params);
194194
static pc_queryid profiler_get_queryid(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt, bool *has_queryid, query_params **qparams);
195+
196+
#if PG_VERSION_NUM >= 190000
197+
198+
static void profiler_fake_queryid_hook(ParseState *pstate, Query *query, const JumbleState *jstate);
199+
200+
#else
201+
195202
static void profiler_fake_queryid_hook(ParseState *pstate, Query *query, JumbleState *jstate);
203+
204+
#endif
205+
196206
static void stmts_walker(profiler_info *pinfo, profiler_stmt_walker_mode, List *stmts, PLpgSQL_stmt *parent_stmt,
197207
const char *description, profiler_stmt_walker_options *opts);
198208
static void profiler_stmt_walker(profiler_info *pinfo, profiler_stmt_walker_mode mode, PLpgSQL_stmt *stmt,
@@ -1823,8 +1833,18 @@ profiler_get_queryid(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt,
18231833
* Generate simple queryid for testing purpose.
18241834
* DO NOT USE IN PRODUCTION.
18251835
*/
1836+
#if PG_VERSION_NUM >= 190000
1837+
1838+
static void
1839+
profiler_fake_queryid_hook(ParseState *pstate, Query *query, const JumbleState *jstate)
1840+
1841+
#else
1842+
18261843
static void
18271844
profiler_fake_queryid_hook(ParseState *pstate, Query *query, JumbleState *jstate)
1845+
1846+
#endif
1847+
18281848
{
18291849
if (prev_post_parse_analyze_hook)
18301850
prev_post_parse_analyze_hook(pstate, query, jstate);

0 commit comments

Comments
 (0)