Re: error with functions

From: shyamperi(at)davlin(dot)co(dot)in
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: error with functions
Date: 2003-09-22 05:42:02
Message-ID: 2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>You do realize that the shell is going to interpret that string in
>double quotes right?
I guess so, for the very same I have tried with
Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
INTEGER AS ' BEGIN RETURN ''$1'' + 1; END; ' LANGUAGE
'plpgsql';"
But still it is not taking it as $1, instead empty string.
Ideeally it shud consider $1 as string... but why isn't it

-----
Warm Regards
Shÿam Peri

II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalore-575003
Ph : 91-824-2451001/5
Fax : 91-824-2451050

----------------Original Message------------------

On Mon, 22 Sep 2003 shyamperi(at)davlin(dot)co(dot)in wrote:

> Command: psql test -c "> CREATE FUNCTION add_one (integer) RETURNS
> INTEGER AS ' BEGIN REURN $1 + 1; END; ' LANGUAGE
> 'plpgsql';"

You do realize that the shell is going to interpret that string in
double quotes right?

---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org

DISCLAIMER: This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient you should not disseminate,distribute,store,print, copy or
deliver this message.Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from
your system.

Attachment Content-Type Size
Untitled1 text/html 1.6 KB

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2003-09-22 05:54:30 Re: error with functions
Previous Message Stephan Szabo 2003-09-22 05:01:51 Re: error with functions