Re: loading a funtion script from a file - Mailing list pgsql-general

From Scott Marlowe
Subject Re: loading a funtion script from a file
Date
Msg-id dcc563d10711210910p5661cea9i2899719c46a71ee2@mail.gmail.com
Whole thread Raw
In response to Re: loading a funtion script from a file  (Richard Huxton <dev@archonet.com>)
Responses Re: loading a funtion script from a file  (Richard Huxton <dev@archonet.com>)
Re: loading a funtion script from a file  (David Fetter <david@fetter.org>)
List pgsql-general
On Nov 21, 2007 10:49 AM, Richard Huxton <dev@archonet.com> wrote:
> Gauthier, Dave wrote:
> > APparently, from "man psql", -c can do only one thing at a time.  But you could do this with 2-3 commands (or 1 if
youwant to wrap the 2 up in a shell script or something).  Here's an example... 
> [snip]
> > psql --dbname mydb -c "\i create_try.sql;"
> > psql --dbname mydb -c "select trythis('foo');"
> > psql --dbname mydb -c "drop function trythis(varchar);"
>
> Or just put everything in one file and use -f <filename>

And from the more than one way to skin a cat department:

cat my.sql | psql mydb
psql mydb < my.sql

pgsql-general by date:

Previous
From: SHARMILA JOTHIRAJAH
Date:
Subject: Re: Postgres table size
Next
From: Richard Huxton
Date:
Subject: Re: loading a funtion script from a file