pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Newbie: execute function error!
2+ messages / 2 participants
[nested] [flat]

* Newbie: execute function error!
@ 2001-03-06 05:55 John GM <gm@weri.com>
  2001-03-07 21:41 ` Re: Newbie: execute function error! dev@archonet.com
  0 siblings, 1 reply; 2+ messages in thread

From: John GM @ 2001-03-06 05:55 UTC (permalink / raw)
  To: pgsql-sql

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?

Thanks!





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Newbie: execute function error!
  2001-03-06 05:55 Newbie: execute function error! John GM <gm@weri.com>
@ 2001-03-07 21:41 ` dev@archonet.com
  0 siblings, 0 replies; 2+ messages in thread

From: dev@archonet.com @ 2001-03-07 21:41 UTC (permalink / raw)
  To: John GM <gm@weri.com>; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-03-07 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-06 05:55 Newbie: execute function error! John GM <gm@weri.com>
2001-03-07 21:41 ` dev@archonet.com

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