Re: loading a funtion script from a file

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: loading a funtion script from a file
Date: 2007-11-21 16:49:25
Message-ID: 47446195.20704@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 you want 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>
--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vyacheslav Kalinin 2007-11-21 16:59:53 Re: Dynamic expressions set in "order by" clause
Previous Message Erik Jones 2007-11-21 16:43:37 Re: Dynamic expressions set in "order by" clause