Re: [ADMIN] su-like behavior

2006-02-03 Thread Alvaro Herrera
Bruno Wolff III wrote: > On Fri, Feb 03, 2006 at 15:48:35 -0800, > David Lutterkort <[EMAIL PROTECTED]> wrote: > > [start as root] > > su - postgres > > psql > > \connect DBNAME DBUSER > > \i script.sql Instead of using \connect, use SET SESSION AUTHORIZA

Re: [ADMIN] su-like behavior

2006-02-03 Thread Bruno Wolff III
On Fri, Feb 03, 2006 at 15:48:35 -0800, David Lutterkort <[EMAIL PROTECTED]> wrote: > Hi, > > I want to run some sql scripts through psql from a process that runs as > root. Since I have no reason to trust the sql scripts, I want to run > them in psql as a specific database user that doesn't hav

[ADMIN] su-like behavior

2006-02-03 Thread David Lutterkort
Hi, I want to run some sql scripts through psql from a process that runs as root. Since I have no reason to trust the sql scripts, I want to run them in psql as a specific database user that doesn't have a corresponding login account, i.e. I want to do something like [start as root]