Re: loading a function from a file

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: loading a function from a file
Date: 2012-04-01 00:04:22
Message-ID: jl8626$r1r$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2012-03-26, and <andreaesposito77(at)gmail(dot)com> wrote:
> Hi all,
> I would like to know how to load a user defined function from a file
> written in pl/pgsql.
>
> I have read it on logging
> psql -h host database < create_some_func.sql
> but then i am forced to redo the login. Is there another way to do it?

another way use a connection string:
psql "host=name dbname=database password=SECRET" < create_some_func.sql

another is log into psql and issue the \i psql command to read the file

\i create_some_func.sql

--
⚂⚃ 100% natural

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2012-04-01 00:59:05 Re: Problems with Binary Replication
Previous Message Andreas 2012-03-31 23:58:02 Re: Problems with Binary Replication