* Trigger argument is used as parameter that can enforce warning about modified * columns. When first argument is "on" or "true", then warnings will be raised. */
| 57 | * columns. When first argument is "on" or "true", then warnings will be raised. |
| 58 | */ |
| 59 | static bool |
| 60 | should_raise_warnings(FunctionCallInfo fcinfo) |
| 61 | { |
| 62 | TriggerData *trigdata = (TriggerData *) fcinfo->context; |
| 63 | Trigger *trigger = trigdata->tg_trigger; |
| 64 | |
| 65 | if (trigger->tgnargs > 0) |
| 66 | { |
| 67 | char **args = trigger->tgargs; |
| 68 | |
| 69 | if (strcmp(args[0], "on") == 0 || |
| 70 | strcmp(args[0], "true") == 0) |
| 71 | return true; |
| 72 | } |
| 73 | |
| 74 | return false; |
| 75 | } |
| 76 | |
| 77 | /* |
| 78 | * Detects emty strings in type text based fields and replaces them by NULL. |
no outgoing calls
no test coverage detected