model-writtenrun 8688 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- James Gray reported that ecpg -o - - accepted standard input on CentOS but failed on AIX, and suspected PostgreSQL's getopt_long implementation #1.
- Bruce Momjian explained that the platforms could use different getopt_long implementations and suggested /dev/stdin as a workaround #2.
- Tom Lane confirmed that PostgreSQL's getopt_long incorrectly parsed a bare "-" as an option, contrary to GNU's behavior, PostgreSQL's getopt implementation, and ecpg's intended handling #3.
- Tom Lane supplied a patch treating a bare "-" as a non-option argument, reported that it fixed his reproduction, and identified missing ecpg documentation as remaining work in the thread's final message #3.
- Tom Lane subsequently committed the attached code unchanged together with expanded ecpg documentation in 980a70b976, backpatching the fix to all supported branches; no later review or unresolved issue appears in the supplied thread.