| 3272 | |
| 3273 | |
| 3274 | int |
| 3275 | main(int argc, char *argv[]) |
| 3276 | { |
| 3277 | static struct option long_options[] = { |
| 3278 | {"pgdata", required_argument, NULL, 'D'}, |
| 3279 | {"encoding", required_argument, NULL, 'E'}, |
| 3280 | {"locale", required_argument, NULL, 1}, |
| 3281 | {"lc-collate", required_argument, NULL, 2}, |
| 3282 | {"lc-ctype", required_argument, NULL, 3}, |
| 3283 | {"lc-monetary", required_argument, NULL, 4}, |
| 3284 | {"lc-numeric", required_argument, NULL, 5}, |
| 3285 | {"lc-time", required_argument, NULL, 6}, |
| 3286 | {"lc-messages", required_argument, NULL, 7}, |
| 3287 | {"no-locale", no_argument, NULL, 8}, |
| 3288 | {"text-search-config", required_argument, NULL, 'T'}, |
| 3289 | {"auth", required_argument, NULL, 'A'}, |
| 3290 | {"auth-local", required_argument, NULL, 10}, |
| 3291 | {"auth-host", required_argument, NULL, 11}, |
| 3292 | {"pwprompt", no_argument, NULL, 'W'}, |
| 3293 | {"pwfile", required_argument, NULL, 9}, |
| 3294 | {"username", required_argument, NULL, 'U'}, |
| 3295 | {"help", no_argument, NULL, '?'}, |
| 3296 | {"version", no_argument, NULL, 'V'}, |
| 3297 | {"debug", no_argument, NULL, 'd'}, |
| 3298 | {"show", no_argument, NULL, 's'}, |
| 3299 | {"noclean", no_argument, NULL, 'n'}, /* for backwards compatibility */ |
| 3300 | {"no-clean", no_argument, NULL, 'n'}, |
| 3301 | {"nosync", no_argument, NULL, 'N'}, /* for backwards compatibility */ |
| 3302 | {"no-sync", no_argument, NULL, 'N'}, |
| 3303 | {"no-instructions", no_argument, NULL, 13}, |
| 3304 | {"sync-only", no_argument, NULL, 'S'}, |
| 3305 | {"waldir", required_argument, NULL, 'X'}, |
| 3306 | {"wal-segsize", required_argument, NULL, 12}, |
| 3307 | {"data-checksums", no_argument, NULL, 'k'}, |
| 3308 | {"max_connections", required_argument, NULL, 1001}, /*CDB*/ |
| 3309 | {"shared_buffers", required_argument, NULL, 1003}, /*CDB*/ |
| 3310 | {"file-encryption-method", required_argument, NULL, 'K'}, |
| 3311 | {"allow-group-access", no_argument, NULL, 'g'}, |
| 3312 | {"discard-caches", no_argument, NULL, 14}, |
| 3313 | {"cluster-key-command", required_argument, NULL, 'c'}, |
| 3314 | {"copy-encryption-keys", required_argument, NULL, 'u'}, |
| 3315 | {NULL, 0, NULL, 0} |
| 3316 | }; |
| 3317 | |
| 3318 | /* |
| 3319 | * options with no short version return a low integer, the rest return |
| 3320 | * their short version value |
| 3321 | */ |
| 3322 | int c; |
| 3323 | int option_index; |
| 3324 | char *effective_user; |
| 3325 | PQExpBuffer start_db_cmd; |
| 3326 | char pg_ctl_path[MAXPGPATH]; |
| 3327 | |
| 3328 | /* |
| 3329 | * Ensure that buffering behavior of stdout matches what it is in |
| 3330 | * interactive usage (at least on most platforms). This prevents |
| 3331 | * unexpected output ordering when, eg, output is redirected to a file. |
nothing calls this directly
no test coverage detected