Re: [GENERAL] psql: do/should we document that argument and option specification order doesn't matter?
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] psql: do/should we document that argument and option specification order doesn't matter? |
| Дата | |
| Msg-id | 15115.1494545947@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | [GENERAL] psql: do/should we document that argument and option specificationorder doesn't matter? ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-general |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > I don't know if this applies anywhere else but I just stumbled across the > fact that our psql documentation is imprecise: > https://www.postgresql.org/docs/current/static/app-psql.html > psql [option...] [dbname [username]] > It does matter that "dbname" precede username; and that it be present if > username is specified. But otherwise the first one or two non-option words > on the command line are taken to be those regardless of position, and any > extra non-option words are ignored. Options can thus be specified before, > after, or in between the dbname and username. This is, unfortunately, platform-specific. glibc's version of getopt_long() takes it upon itself to physically rearrange the argv list to make such cases work. On platforms where getopt_long() does not so blatantly exceed its authority, only the documented argument order will work. regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера