Re: plpgsql question...

From: Steve Wampler <swampler(at)noao(dot)edu>
To:
Cc: postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql question...
Date: 2000-06-08 15:30:58
Message-ID: 393FBC32.F2733731@noao.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> Steve Wampler <swampler(at)noao(dot)edu> writes:
> > PostgreSQL 6.5.3
>
> > ========================
> > appdb=> create function insert_or_update() returns opaque as '
> > appdb'> begin
> > appdb'> insert into attributes_table values(new.id,new.name,
> > appdb'> new.units,new.value);
> > appdb'> return NULL;
> > appdb'> end;'
> > appdb-> language 'plpgsql';
> > CREATE
> > appdb=> create trigger t before insert on attributes for each row
> > appdb-> execute procedure insert_or_update();
> > CREATE
> > appdb=> insert into attributes values('site','prefix','none','kp');
> > NOTICE: plpgsql: ERROR during compile of insert_or_update near line 2
> > ERROR: syntax error at or near "in"
> > appdb=>
> > =========================
>
> > Does anyone see what I've done wrong?
>
> Nothing that I can see. I copied and pasted this trigger into current
> sources and it worked fine. Ditto for your other example.
>
> There must be something pretty broken about your copy of plpgsql;
> dunno what exactly. I'd recommend updating to 7.0.2 and then seeing
> if the problem persists. If it does we can dig deeper.

Just a followup to the group - upgrading from 6.5.3 to 7.0.2 fixed the
problem, as Tom suggested (both on Linux [RH6.1 - really 7.0.3 here]
and Solaris 2.7).

Thanks, Tom!

--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler(at)noao(dot)edu

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2000-06-08 15:34:48 Re: PostgreSQL on Cobalt Qube2?
Previous Message Ed Loehr 2000-06-08 15:17:01 Re: Procedure Size Limitation