Received: from www-uk-05.digiserve.com ([195.172.23.63]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27Lpvx10019 for ; Wed, 7 Mar 2001 16:51:57 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id VAA15384; Wed, 7 Mar 2001 21:53:00 GMT Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id 9D8A12A478; Wed, 7 Mar 2001 21:41:29 +0000 (GMT) From: dev@archonet.com Date: Wed, 07 Mar 2001 21:41:27 GMT Message-ID: <20010307.21412700@client.archonet.com> Subject: Re: Newbie: execute function error! To: John GM Cc: pgsql-sql@postgresql.org Reply-To: dev@archonet.com In-Reply-To: <981uer$1vu3$1@news.tht.net> References: <981uer$1vu3$1@news.tht.net> X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.postgresql.org id f27Lpwx10025 X-Archive-Number: 200103/160 X-Sequence-Number: 1813 On 3/6/01, 5:55:05 AM, John GM 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