On Mon, Jan 25, 2010 at 04:05:57PM +0100, Stefan Schwarzer wrote:
> Guess I'd need to do this as/with postgres user/role.

Yup, or at least somebody with superuser rights.  Try "\du" in psql.

> But really not  
> sure how this goes. Thought it should be something like this:
> 
>       sudo su - postgres -c '/usr/local/pgsql/bin/pgsql' < tablefunc.sql
> 
> But that's no correct.

Looks about right, what do you get back?

The following does basically the same thing, but I find it a bit easier
to follow:

  sudo -u postgres /usr/local/pgsql/bin/pgsql < tablefunc.sql

-- 
  Sam  http://samason.me.uk/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to