Hi,
I'm finding that the following function does not run properly ...
CREATE OR REPLACE FUNCTION :S.insert_scripts ( text )
RETURNS integer AS '
DECLARE
my_script_type alias for $1;
my_script_type_id integer;
BEGIN
my_script_type_id := 0;
select into my_script_type_id type_id from :S.scripts_ref where
type_name = my_script_type ;
return my_script_type_id;
END;
' LANGUAGE 'plpgsql' ;
it fails on the ":S" parameter substitution in line 6.
wiline=# \echo :S
rwieland
wiline=# select :S.isf('update');
WARNING: Error occurred while executing PL/pgSQL function isf
WARNING: line 6 at select into variables
ERROR: parser: parse error at or near ":" at character 22
Is this expected behavior I wonder? Does the parameter substitution facility not extend down "into" the function space ...
Thanks for any comments,
Dick Wieland
---