From: Richard Huxton <dev@archonet.com>
To: Tim Perdue <tim@perdue.net>
To: pgsql-sql@postgresql.org
Subject: Re: PL/pgSQL "compilation error"
Date: Wed, 14 Mar 2001 16:24:15 -0000
Message-ID: <005001c0aca3$37208a20$1001a8c0@archonet.com> (raw)
References: <20010314085635.O670@mail.perdue.net>
From: "Tim Perdue" <tim@perdue.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: dev@archonet.com, tim@perdue.net, pgsql-sql@postgresql.org
Subject: Re: PL/pgSQL "compilation error"
In-Reply-To: <005001c0aca3$37208a20$1001a8c0@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox