From: Richard Huxton <dev@archonet.com>
To: iuri.sampaio@computer.org
Cc: pgsql-sql@postgresql.org
Subject: Re: sql query - create replace function
Date: Thu, 20 Dec 2007 08:31:29 +0000
Message-ID: <476A2861.2060905@archonet.com> (raw)
In-Reply-To: <59d6a8dc0712192129s485fb71wcb7c6323fac85258@mail.gmail.com>
References: <59d6a8dc0712192129s485fb71wcb7c6323fac85258@mail.gmail.com>
Iuri Sampaio wrote:
> Hi all,
>
> I created a script to install postgresql. One of the steps is to run a sql
> query.
>
> the problem is that i need to run the query as postgres user, plus it needs
> to be at psql shell prompt command line, i.e:
Why does it need to be at the psql prompt?
> I expected something like
> su - postgres -c "pgsql dbname && create or replace function bitfromint4
> (integer) returns bit varying as ' begin return $1::bit(32); end;' language
> 'plpgsql' immutable str\
> ict;"
What's wrong with this?
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, iuri.sampaio@computer.org
Subject: Re: sql query - create replace function
In-Reply-To: <476A2861.2060905@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox