pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: shyamperi@davlin.co.in
To: pgsql-admin@postgresql.org
Subject: Re: error with functions
Date: Mon, 22 Sep 2003 11:12:02 +0530 (IST)
Message-ID: <2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in> (raw)

>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@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 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.

Attachments:

Untitled1 (text/html, 1.6K) download <head></head><body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4><P>&gt;You do realize that the shell is going to interpret that string in<BR>&gt;double quotes right?<BR>I guess so, for the very same I have tried with<BR>Command: psql test -c "&gt; CREATE FUNCTION add_one (integer) RETURNS<BR>&nbsp;INTEGER AS '&nbsp;&nbsp;&nbsp;&nbsp; BEGIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETURN ''$1'' + 1;&nbsp;&nbsp;&nbsp;&nbsp; END; ' LANGUAGE<BR>&nbsp;'plpgsql';"<BR>But still it is not taking it as $1, instead empty string.<BR>Ideeally it shud consider $1 as string... but why isn't it<BR><BR></P><PRE>----- Warm Regards Shÿam Peri II Floor, Punja Building, M.G.Road, Ballalbagh, Mangalore-575003 Ph : 91-824-2451001/5 Fax : 91-824-2451050 </PRE><BR><BR>----------------Original Message------------------<BR><PRE> On Mon, 22 Sep 2003 shyamperi@davlin.co.in wrote: &gt; Command: psql test -c "&gt; CREATE FUNCTION add_one (integer) RETURNS &gt; INTEGER AS ' BEGIN REURN $1 + 1; END; ' LANGUAGE &gt; '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</PRE></body><br><br><b> 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.</b>

view thread (12+ messages)  latest in thread

Message-ID: <2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in>
Permalink:  ../2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in/
Also on:    postgresql.org/message-id/2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: shyamperi@davlin.co.in
  Subject: Re: error with functions
  In-Reply-To: <2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in>
  References: <2110482.1064209766872.JavaMail.tomcat@mail.davlin.co.in>

* 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