plpgsql test function - Mailing list pgsql-general

From kurt miller
Subject plpgsql test function
Date
Msg-id 20000711162047.73309.qmail@hotmail.com
Whole thread Raw
Responses Re: plpgsql test function  (JanWieck@t-online.de (Jan Wieck))
List 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


pgsql-general by date:

Previous
From: "Alex Bolenok"
Date:
Subject: PostgreSQL, ODBCExpress and locales
Next
From: "Mike Sears"
Date:
Subject: copying database tables into the curent database