pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dev@archonet.com
To: John GM <gm@weri.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Newbie: execute function error!
Date: Wed, 07 Mar 2001 21:41:27 GMT
Message-ID: <20010307.21412700@client.archonet.com> (raw)
In-Reply-To: <981uer$1vu3$1@news.tht.net>
References: <981uer$1vu3$1@news.tht.net>

On 3/6/01, 5:55:05 AM, John GM <gm@weri.com> wrote regarding [SQL] Newbie: 
execute function error!:

> I created a sample function:

> CREATE FUNCTION concat_text (text, text) RETURNS text AS '
> BEGIN
>     RETURN $1 || $2;
> END; '
> LANGUAGE 'plpgsql';


> The creation was fine.  But when I execute the function with : select
> concat('a', 'b');

> I get the error:

> NOTICE:  plpgsql: ERROR during compile of concat_text near line 1
> "RROR:  parse error at or near "

> What did I do wrong?

Nothing wrong with your function, but the error seems to be missing an E 
at the front (unless it's a typo) - you didn't cut and paste the 
definition from a Windows machine to *nix did you - leaves CR characters 
lying around.

- Richard Huxton



view thread (2+ messages)

Message-ID: <20010307.21412700@client.archonet.com>
Permalink:  ../20010307.21412700@client.archonet.com/
Also on:    postgresql.org/message-id/20010307.21412700@client.archonet.com

 · 

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-sql@postgresql.org
  Cc: dev@archonet.com, gm@weri.com
  Subject: Re: Newbie: execute function error!
  In-Reply-To: <20010307.21412700@client.archonet.com>
  References: <981uer$1vu3$1@news.tht.net> <20010307.21412700@client.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