Skip to content

Commit ed0af33

Browse files
committed
Revert temporary patch to debug Windows breakage.
This reverts commit 0a24820.
1 parent 0635c0b commit ed0af33

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/pl/plpgsql/src/pl_comp.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ do_compile(FunctionCallInfo fcinfo,
285285
int *in_arg_varnos = NULL;
286286
PLpgSQL_variable **out_arg_variables;
287287
MemoryContext func_cxt;
288-
PLpgSQL_trigtype fn_is_trigger;
289288

290289
/*
291290
* Setup the scanner input and error info. We assume that this function
@@ -353,12 +352,11 @@ do_compile(FunctionCallInfo fcinfo,
353352
function->resolve_option = plpgsql_variable_conflict;
354353

355354
if (is_dml_trigger)
356-
fn_is_trigger = PLPGSQL_DML_TRIGGER;
355+
function->fn_is_trigger = PLPGSQL_DML_TRIGGER;
357356
else if (is_event_trigger)
358-
fn_is_trigger = PLPGSQL_EVENT_TRIGGER;
357+
function->fn_is_trigger = PLPGSQL_EVENT_TRIGGER;
359358
else
360-
fn_is_trigger = PLPGSQL_NOT_TRIGGER;
361-
function->fn_is_trigger = fn_is_trigger;
359+
function->fn_is_trigger = PLPGSQL_NOT_TRIGGER;
362360

363361
/*
364362
* Initialize the compiler, particularly the namespace stack. The
@@ -376,7 +374,6 @@ do_compile(FunctionCallInfo fcinfo,
376374
sizeof(PLpgSQL_datum *) * datums_alloc);
377375
datums_last = 0;
378376

379-
Assert(fn_is_trigger == function->fn_is_trigger);
380377
switch (function->fn_is_trigger)
381378
{
382379
case PLPGSQL_NOT_TRIGGER:
@@ -540,13 +537,9 @@ do_compile(FunctionCallInfo fcinfo,
540537
rettypeid == RECORDOID)
541538
/* okay */ ;
542539
else if (rettypeid == TRIGGEROID || rettypeid == EVTTRIGGEROID)
543-
{
544540
ereport(ERROR,
545541
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
546-
errmsg("trigger functions can only be called as triggers"),
547-
errhint("CALLED_AS_TRIGGER=%d CALLED_AS_EVENT_TRIGGER=%d",
548-
CALLED_AS_TRIGGER(fcinfo), CALLED_AS_EVENT_TRIGGER(fcinfo))));
549-
}
542+
errmsg("trigger functions can only be called as triggers")));
550543
else
551544
ereport(ERROR,
552545
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy