I am attempting to generate a temporary function to execute some dml with the following script:<br /><br />create or
replacefunction setuplicense() returns integer as $$<br />declare<br /> hwcustid integer := 0;<br /> retval
integer:= 0;<br /> begin<br /> insert into license.customer<br /> ( customer_id ) values ( hwcustid );<br />
commit;<br/> return retval;<br />end;<br />$$<br />LANGUAGE plpgsql;<br /><br />select setuplicense();<br /><br />When
runningthis with psql I get the following:<br /><br />Error: syntax error at or near "create"<br /><br />Does anyone
havea suggestion as to what is causing this?<br /><br />Thanks<br />