plpgsql test function

From: "kurt miller" <miller_kurt_e(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: plpgsql test function
Date: 2000-07-11 09:20:47
Message-ID: 20000711162047.73309.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This simple test function fails.

----------------------------------------------
drop function testit(text);
create function testit(text) returns text as '
DECLARE
myval text;
BEGIN
myval:= $1;
return myval;
END;
' language 'plpgsql';

select testit('testing');
select testit(''testing'');
----------------------------------------------

Result:

DROP
CREATE
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near "testing"

It doesn't seem like the parameter passing mechanism is working.
What am i missing?

TIA,
-km

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vince Vielhaber 2000-07-11 09:43:40 Re: [INTERFACES] Re: Link to postgesql components
Previous Message Alex Bolenok 2000-07-11 08:28:15 Re: Re: importing into postgres from access