Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 862631337BBC for ; Mon, 7 Mar 2011 05:31:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67841-01-4 for ; Mon, 7 Mar 2011 09:31:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 08CBA1337B8C for ; Mon, 7 Mar 2011 05:31:21 -0400 (AST) Received: from [192.168.10.3] (ASte-Genev-Bois-153-1-34-187.w83-200.abo.wanadoo.fr [83.200.24.187]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id BBE643B909; Mon, 7 Mar 2011 10:31:21 +0100 (CET) Message-ID: <4D74A5E9.7070906@lelarge.info> Date: Mon, 07 Mar 2011 10:31:21 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Lukasz Brodziak CC: pgsql-admin@postgresql.org Subject: Re: Unable to create function via psql References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/69 X-Sequence-Number: 36941 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