Re: Unable to create function via psql - Mailing list pgsql-admin

From Guillaume Lelarge
Subject Re: Unable to create function via psql
Date
Msg-id 4D74A5E9.7070906@lelarge.info
Whole thread Raw
In response to Unable to create function via psql  (Lukasz Brodziak <lukasz.brodziak@gmail.com>)
Responses Re: Unable to create function via psql  (Lukasz Brodziak <lukasz.brodziak@gmail.com>)
List pgsql-admin
Le 07/03/2011 09:17, Lukasz Brodziak a écrit :
> Hello,
>
> I have a problem with creating function through script ran in psql.
> I'm running the script AdminPack.sql from the contrib package using
> this statement:
> sudo su postgres -c psql MyDB < /usr/share/postgresql/8.2/contrib/adminpack.sql
>
> Script performs without problem yet when I log into my software I get
> the error that pg_file_lenght does not exists. Opening the script in
> pgAdmin and hitting F5 creates the function and enables logging into
> the program without error. Can anyone help me with running the script
> correctly through shell.

You need to execute the script in the postgres database, not the MyDB
database.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

pgsql-admin by date:

Previous
From: Lukasz Brodziak
Date:
Subject: Unable to create function via psql
Next
From: Lukasz Brodziak
Date:
Subject: Re: Unable to create function via psql