1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Revert recent commit re positional arguments.

This commit is contained in:
Andrew Dunstan
2012-04-18 10:56:16 -04:00
parent cd3d613ffe
commit 062f113e52
6 changed files with 38 additions and 75 deletions

View File

@@ -87,24 +87,14 @@ main(int argc, char *argv[])
}
}
/*
* We set dbname from positional arguments if it is not
* already set by option arguments -d. If not doing
* listlangs, positional dbname must follow positional
* langname.
*/
if (argc - optind > 0)
{
if (listlangs)
{
if (dbname == NULL)
dbname = argv[optind++];
}
dbname = argv[optind++];
else
{
langname = argv[optind++];
if (argc - optind > 0 && dbname == NULL)
if (argc - optind > 0)
dbname = argv[optind++];
}
}