Re: Program Syntax Help Needed

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: SIMON(at)hslc(dot)org
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Program Syntax Help Needed
Date: 2010-04-27 19:21:50
Message-ID: 9F0356D9-6DAD-4353-9544-FE9E5B6E095D@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message gargoyle60 2010-04-28 08:27:41 Re: PostgreSQL Book
Previous Message SIMON 2010-04-27 19:07:42 Program Syntax Help Needed