Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote
>> so it sure looks like we *are* using getpwuid.
> You're right but I do not understand why it fails only with
> PostgreSQL.
Perhaps one of the pile of random libraries we include is supplying a
broken version of getpwuid?
I concur with the suggestion to try strace'ing to compare PG's behavior
to something that works (such as ls).
regards, tom lane