X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A9F51D1B589 for ; Mon, 22 Sep 2003 06:07:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 55797-04 for ; Mon, 22 Sep 2003 03:07:07 -0300 (ADT) Received: from davlin.co.in (ns.vasnet.net.in [202.4.160.11]) by svr1.postgresql.org (Postfix) with ESMTP id 17DDBD1B8A3 for ; Mon, 22 Sep 2003 03:07:06 -0300 (ADT) Received: from Application (unknown [202.4.160.30]) by davlin.co.in (Postfix) with ESMTP id 4A8AA14B66 for ; Mon, 22 Sep 2003 11:12:02 +0530 (IST) Message-ID: <2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in> From: shyamperi@davlin.co.in To: pgsql-admin@postgresql.org Subject: Re: error with functions Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_351_7263730.1064209766410" Date: Mon, 22 Sep 2003 11:12:02 +0530 (IST) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/339 X-Sequence-Number: 10427 ------=_Part_351_7263730.1064209766410 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable >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=FFam Peri II Floor, Punja Building, M.G.Road, Ballalbagh, Mangalore-575003=20 Ph : 91-824-2451001/5 Fax : 91-824-2451050=20 ----------------Original Message------------------ On Mon, 22 Sep 2003 shyamperi@davlin.co.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@postgresql.org DISCLAIMER: This message contains privileged and confidential information a= nd 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. ------=_Part_351_7263730.1064209766410 Content-type: text/html Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=Untitled1

>You do realize that the shell is going to interpret that strin= g in
>double quotes right?
I guess so, for the very same I have tr= ied with
Command: psql test -c "> CREATE FUNCTION add_one (integer) R= ETURNS
 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 wh= y isn't it

-----
Warm Regards
Sh=FFam Peri

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




----------------Original Message------------------
On Mon, 22 Sep 2003 shyamperi@davlin.co.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@postgresql.org


DISCLAIMER: This message contains privileged and confidential information a= nd 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. ------=_Part_351_7263730.1064209766410--