On 1999-12-09, Oliver Elphick mentioned:
> >I propose that I remove it, and that it instead be possible that you can
> >do
> >
> >root# su -l postgres -c 'initdb ...'
>
> You can already do this; this example is from the Debian package installation
> It can be quite tricky, though, since there are a number of different su
> versions around. I would prefer it if root were able to run initdb directly
Of course the user would actually invoke the su himself, so he better know
what his does.
> and set the ownerships as part of the process. The ability to run as root
> should only apply to initdb.
I don't think there is a good (let alone portable) way to set ownership of
a shell script at run time. While you could do all kinds of funny business
with file ownerships, the postgres backends will still refuse to execute.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden