append a script to the list of scripts to process */
| 5450 | |
| 5451 | /* append a script to the list of scripts to process */ |
| 5452 | static void |
| 5453 | addScript(ParsedScript script) |
| 5454 | { |
| 5455 | if (script.commands == NULL || script.commands[0] == NULL) |
| 5456 | { |
| 5457 | pg_log_fatal("empty command list for script \"%s\"", script.desc); |
| 5458 | exit(1); |
| 5459 | } |
| 5460 | |
| 5461 | if (num_scripts >= MAX_SCRIPTS) |
| 5462 | { |
| 5463 | pg_log_fatal("at most %d SQL scripts are allowed", MAX_SCRIPTS); |
| 5464 | exit(1); |
| 5465 | } |
| 5466 | |
| 5467 | CheckConditional(script); |
| 5468 | |
| 5469 | sql_script[num_scripts] = script; |
| 5470 | num_scripts++; |
| 5471 | } |
| 5472 | |
| 5473 | /* |
| 5474 | * Print progress report. |
no test coverage detected