On Apr 27, 2010, at 15:07 , SIMON(at)hslc(dot)org wrote:
> Hello -
>
> I am new to PostgreSQL and trying to create a program to update a table, but I
> am getting syntax errors.
>
> Here is my program:
>
> -------------------------------------------------------------
> -- Import copy_note data
> CREATE OR REPLACE FUNCTION add_copy_notes() RETURNS integer AS '
> DECLARE
> copynote RECORD;
<snip />
> ' LANGUAGE SQL;
You're using PL/pgSQL syntax in a function declared to be in language SQL. Try using LANGUAGE PLPGSQL instead.
Michael Glaesemann
grzm seespotcode net