Skip to content

Commit

Permalink
fix build against master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
okbob committed Dec 21, 2024
1 parent 5492db8 commit e3e4e17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/format.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
#include "plpgsql_check.h"

#include "access/htup_details.h"
#include "catalog/pg_collation.h"
#include "mb/pg_wchar.h"
#include "tsearch/ts_locale.h"
#include "utils/builtins.h"
#include "utils/formatting.h"
#include "utils/json.h"
#include "utils/xml.h"

Expand Down Expand Up @@ -165,7 +166,7 @@ plpgsql_check_format_num(char *format_str)
{
int result;

char *format_lower_str = lowerstr(format_str);
char *format_lower_str = str_tolower(format_str, strlen(format_str), DEFAULT_COLLATION_OID);

if (strcmp(format_lower_str, "text") == 0)
result = PLPGSQL_CHECK_FORMAT_TEXT;
Expand Down
4 changes: 4 additions & 0 deletions src/plpgsql_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,14 @@ extern plpgsql_check__ns_lookup_t plpgsql_check__ns_lookup_p;
#define FORMAT_0PARAM_OID 3540
#define FORMAT_NPARAM_OID 3539

#if PG_VERSION_NUM < 180000

#ifndef TupleDescAttr
#define TupleDescAttr(tupdesc, i) ((tupdesc)->attrs[(i)])
#endif

#endif

#define recvar_tuple(rec) (rec->erh ? expanded_record_get_tuple(rec->erh) : NULL)
#define recvar_tupdesc(rec) (rec->erh ? expanded_record_fetch_tupdesc(rec->erh) : NULL)

Expand Down

0 comments on commit e3e4e17

Please sign in to comment.