Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0606A1337999 for ; Mon, 7 Mar 2011 07:55:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 84111-02 for ; Mon, 7 Mar 2011 11:55:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vx0-f174.google.com (mail-vx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id 7108B133798E for ; Mon, 7 Mar 2011 07:55:21 -0400 (AST) Received: by vxi39 with SMTP id 39so3613741vxi.19 for ; Mon, 07 Mar 2011 03:55:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wy3ZjFPOfR/tJ/JJ8tzc13SqtclP07Sb7OeV/lSc86Y=; b=tqr9HJF/FcJ23AdoQ8bG300w4TCcpuuCA9PqNSgj62WYmfxBMyOzajxvJgpfUx7Kjs 72Qbhds2xeAUSyeRX73yrnlWwMYYIET/6frXDVX8pSXRlBdXiNgDJiLIkW/+K/DJOeNk HF8gEKGpYzJ0+t07sf5xqXhLCmGOcMRsNsnXI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=T2D8xtRN0lZTd/BxwOzDraz9ajy7R7Gha6pvbrB/IyPy+BZ6wHGdfZVocq+GVAGESv fnmXeL8yp75KxDED0V0NrGICtwa7fM8msUXQbUWUymUvOXN61QUxWI/S3PA98zqah1VF yYOO8ojGzipSxqfwl1LQSi5AiOezfAPM2N/WA= MIME-Version: 1.0 Received: by 10.52.0.168 with SMTP id 8mr5174542vdf.282.1299498920970; Mon, 07 Mar 2011 03:55:20 -0800 (PST) Received: by 10.52.159.130 with HTTP; Mon, 7 Mar 2011 03:55:20 -0800 (PST) In-Reply-To: <4D74BC03.2020101@lelarge.info> References: <4D74A5E9.7070906@lelarge.info> <4D74B72E.20405@lelarge.info> <4D74BC03.2020101@lelarge.info> Date: Mon, 7 Mar 2011 12:55:20 +0100 Message-ID: Subject: Re: Unable to create function via psql From: Lukasz Brodziak To: Guillaume Lelarge Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201103/74 X-Sequence-Number: 36946 Yes. The only DBs on the server are both templates, postgres and MyDB. Still don't why the problem with the function occurs only when the script is ran through psql and not through pgAdmin. 2011/3/7 Guillaume Lelarge : > Le 07/03/2011 11:54, Lukasz Brodziak a =C3=A9crit : >> Here it is: http://img69.imageshack.us/i/errorjn.png/ >> >> Again, when I perform AdminPack.sql in pgAdmin I don't get the error. >> > > You don't do the same thing. If "performing" adminpack.sql is executing > it, you also don't have an error with psql when you execute it. At > least, the error message displayed has nothing to do with executing the > adminpack SQL script. > > To get back to your error message, it simply says that the > pg_file_length(text) function doesn't exist in the database your tool is > connected too. So, first, you need to make sure that your tool connects > to the database where you added the functions (IOW, where you executed > the adminpack script). > > > -- > Guillaume > =C2=A0http://www.postgresql.fr > =C2=A0http://dalibo.com > --=20 =C5=81ukasz Brodziak "What if everyting around You isn't quite as it seems, What if all the world You think You know is an inelaborate dream When You look at Your reflection is that all you want it to be What if You could look right through the cracks Would You find Yourself...... Find Yourself afraid to see"