Geoff Caplan <geoff(at)productivity(dot)co(dot)uk> writes:
> I have tried setting it in my bash /etc/profile configuration file,
> and it shows up ok if I "echo $PGDATA" in the shell. But none of the
> postgres utilities such as "initdb" seem to be able to find it.
You probably forgot to say "export PGDATA"; without that it's just a
local variable in your shell.
regards, tom lane