Hi,
as the subject says -
if I do the same interactively in the interpreter, it works.
I tried plsql < x.sql and plsql -f x.sql, both fail with this code:
create function myfunc(text) RETURNS text AS
'
plpy.notice("hallo Notiz")' LANGUAGE 'plpython';
ERROR: plpython: Unable to compile function myfunc
exceptions.SyntaxError: invalid syntax (line 2)
This works OK in x.sql:
create function myfunc(text) RETURNS text AS
'plpy.notice("hallo Notiz")' LANGUAGE 'plpython';
but multiline only works when using psql interactively.
This seems to be python specific, as this one also works
with plsql -f x.sql:
create function simple(text) returns text as
'
BEGIN
RETURN $1 || $1 ;
END;
' LANGUAGE 'plpgsql';
BTW I am using PostgreSQL 7.3.4
--
Wolfgang