Skip to content

Commit b141aa5

Browse files
committed
For CodeRabbitAI's comments.
1 parent 1bbeb75 commit b141aa5

11 files changed

Lines changed: 14 additions & 15 deletions

File tree

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18335,7 +18335,7 @@ else
1833518335
$as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
1833618336

1833718337
SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18338-
LIBPQ_SEMA_IMPLEMENTATION="src/interfaces/libpq/win32_ivyxsema.c"
18338+
LIBPQ_SEMA_IMPLEMENTATION="src/interfaces/libpq/win32_ivysema.c"
1833918339
fi
1834018340

1834118341

src/backend/executor/execExpr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4591,7 +4591,7 @@ ExecInitFuncOutParams(Expr *node, ExprState *state,
45914591
if (!allow_out_parameter_const)
45924592
ereport(ERROR,
45934593
(errcode(ERRCODE_DATA_EXCEPTION),
4594-
errmsg("OUT or IN OUT arguments of the funtion %s musb be variables ",
4594+
errmsg("OUT or IN OUT arguments of the function %s must be variables",
45954595
funcname)));
45964596
return;
45974597
}

src/backend/parser/parse_clause.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,7 +3934,7 @@ interpretRowidOption(List *defList, bool allowRowid)
39343934
}
39353935

39363936
/*
3937-
* CheckRangeFunc
3937+
* check_funcexpr_outparams
39383938
* If the function has out parameters,
39393939
* can't call the function in SQL, such as 'from function(..)'
39403940
*/
@@ -3995,7 +3995,7 @@ check_funcexpr_outparams(List *funcexprs)
39953995
ReleaseSysCache(procTup);
39963996
ereport(ERROR,
39973997
(errcode(ERRCODE_DATA_EXCEPTION),
3998-
errmsg("OUT or IN OUT arguments of the funtion %s musb be variables ",
3998+
errmsg("OUT or IN OUT arguments of the funtion %s must be variables ",
39993999
proname)));
40004000
}
40014001
}

src/include/commands/defrem.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "parser/parse_node.h"
2020
#include "tcop/dest.h"
2121
#include "utils/array.h"
22-
#include "tcop/dest.h"
2322

2423
/* commands/dropcmds.c */
2524
extern void RemoveObjects(DropStmt *stmt);

src/include/nodes/params.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ typedef void (*ParamCompileHook) (ParamListInfo params, struct Param *param,
111111

112112
typedef void (*ParserSetupHook) (struct ParseState *pstate, void *arg);
113113

114-
typedef void (*OutParamSepupHook) (void *scratch);
114+
typedef void (*OutParamSetupHook) (void *scratch);
115115

116116
typedef struct ParamListInfoData
117117
{
@@ -123,7 +123,7 @@ typedef struct ParamListInfoData
123123
void *parserSetupArg;
124124
char *paramValuesStr; /* params as a single string for errors */
125125
int numParams; /* nominal/maximum # of Params represented */
126-
OutParamSepupHook outparamSepup; /* OUT parameters hook */
126+
OutParamSetupHook outparamSepup; /* OUT parameters hook */
127127
bool topLevelIsCall; /* is top level call statement ? */
128128
MemoryContext outctext; /* save out parameter memorycontext */
129129
bool haveout; /* parameters have out parameters */

src/include/nodes/parsenodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ typedef struct OraParamRef
313313
{
314314
NodeTag type;
315315
int number; /* the number of the parameter */
316-
int location; /* token location, or -1 if unknown */
316+
ParseLoc location; /* token location, or -1 if unknown */
317317
char *name; /* placeholder name */
318318
} OraParamRef;
319319

src/interfaces/libpq/ivy_sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Portions Copyright (c) 2025, IvorySQL Global Development Team
1515
*
16-
* src/include/ivy_sema.h
16+
* src/interfaces/libpq/ivy_sema.h
1717
*
1818
*-------------------------------------------------------------------------
1919
*/

src/interfaces/libpq/ivytest/testlibpq_binary_float.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "libpq-ivy.h"
1818
#include <string.h>
1919
#include <stdint.h>
20-
#include <string.h>
2120
#include <netinet/in.h>
2221
#include <sys/types.h>
2322

src/interfaces/libpq/sysv_ivysema.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ typedef int IpcSemaphoreId; /* semaphore ID returned by semget(2) */
4141
#define IPCProtection (0600) /* access/modify by user only */
4242

4343
#define PGSemaMagic 537 /* must be less than SEMVMX */
44+
#ifdef SEMVMX
45+
StaticAssertDecl(PGSemaMagic < SEMVMX, "PGSemaMagic must be less than SEMVMX");
46+
#endif
4447

4548
static IpcSemaphoreKey nextSemaKey; /* next key to try using */
4649

@@ -121,7 +124,7 @@ IpcSemaphoreInitialize(IpcSemaphoreId semId, int semNum, int value)
121124
if (saved_errno == ERANGE)
122125
fprintf(stderr, "You possibly need to raise your kernel's SEMVMX value to be at least %d "
123126
"Look into the PostgreSQL documentation for details.", value);
124-
return;
127+
exit(-1);
125128
}
126129
}
127130

@@ -318,7 +321,7 @@ PGSemaphoreLock(PGSemaphore sema)
318321
if (errStatus < 0)
319322
{
320323
fprintf(stderr, "semop(id=%d) failed: %m", sema->semId);
321-
return;
324+
exit(-1);
322325
}
323326
}
324327

src/pl/plisql/src/pl_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4253,7 +4253,7 @@ plisql_estate_setup(PLiSQL_execstate *estate,
42534253
estate->paramLI->parserSetup = (ParserSetupHook) plisql_parser_setup;
42544254
estate->paramLI->parserSetupArg = NULL; /* filled during use */
42554255
estate->paramLI->numParams = estate->ndatums;
4256-
estate->paramLI->outparamSepup = (OutParamSepupHook) plisql_out_param_setup;
4256+
estate->paramLI->outparamSepup = (OutParamSetupHook) plisql_out_param_setup;
42574257
estate->paramLI->paramnames = NULL;
42584258

42594259

0 commit comments

Comments
 (0)