The postgresql interactive terminal will dump core on any script that is
run via the -f command line option if their exists a connect line without
a valid user. An example connect line is in one of the attached files.
The user that I have choosen is just testuser, you will see what I mean if
you just run that script on any database you have on your system, assuming
that you don't have a user called testuser. If you do, change the
username and see what happens. This bug has been in psql for the last
couple of versions that I have tested.
Also attached is a patch that seems to correct the issue. I admit that I
haven't studied the code long enough to determine if the fix is suitable,
but I feel that it will give you something to work from if it is not.
--
//===================================================================\\
|| D. Hageman <dhageman(at)dracken(dot)com> ||
\\===================================================================//