From: | "Richard Huxton" <dev(at)archonet(dot)com> |
---|---|
To: | "Tim Perdue" <tim(at)perdue(dot)net>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL "compilation error" |
Date: | 2001-03-14 16:24:15 |
Message-ID: | 005001c0aca3$37208a20$1001a8c0@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-sql |
From: "Tim Perdue" <tim(at)perdue(dot)net>
> Hello all - I apologize for the newbie-esque question, but the debug
output
> from postgres when you have a bug in your PL/pgSQL procedure is none to
> detailed.
>
> I've created the following procedure and am getting an error when I try to
> update the table. The error is something like "parse error near ; on line
50".
> Line 50 is the last line.
You're writing 50 line functions and you're calling yourself a newbie? Hate
to think what that makes me.
> There's probably something glaring wrong in here that I'm not seeing, but
any
> help would be appreciated.
Nothing huge leaps out at me except for the \ and the occasional lower-case
'new' - don't know if 'new' is the same as 'NEW' - not sure I've tried it.
I have used statements on multiple lines without the \ though, so it might
be worth snipping them and seeing what happens.
> I don't know if the \ at the end of the line is a problem, but those were
> added late in the game and didn't change the error message ;-)
[snip]
> UPDATE artifact_counts_agg SET open_count=open_count-1 \
> WHERE group_artifact_id=new.group_artifact_id;
Failing that, email me the definition of artifacts_count_agg and artifact
and I'll play with it here.
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-03-14 16:28:03 | Re: PL/pgSQL "compilation error" |
Previous Message | Bruce Momjian | 2001-03-14 16:06:20 | Re: [SQL] PL/pgSQL "compilation error" |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2001-03-14 16:26:59 | Re: |
Previous Message | Bruce Momjian | 2001-03-14 16:06:20 | Re: [SQL] PL/pgSQL "compilation error" |