Re: loading a funtion script from a file

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: loading a funtion script from a file
Date: 2007-11-21 15:50:03
Message-ID: 20071121155003.GA5201@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pau Marc Munoz Torres <paumarc(at)gmail(dot)com> schrieb:

> Hi
>
> I've written a sql function in a text file, and now, i would like to upload
> into postgresql an execute, is there any command to do it? as far as I know in
> mysql exist source command, is there something similar in postgresql?

Of course. Start psql and type:

\i /path/to/your/script.sql

Regards, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2007-11-21 16:38:44 Re: Postgres table size
Previous Message Sergey Konoplev 2007-11-21 15:48:08 Dynamic expressions set in "order by" clause