Re: Trigger Error!

From: Richard Huxton <dev(at)archonet(dot)com>
To: jreniz <jreniz(at)tutopia(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger Error!
Date: 2001-03-19 07:35:50
Message-ID: 3AB5B6D4.65C336A1@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jreniz wrote:
>
> Hi!
>
> I've postgresql 6.5.3 system and 50 tables, but i need to run this
> trigger: (the comments are in spanish :-) )

> select sum(stomin) into suma from almproterpt
> where codproter=new.codproter;

> 'There is no operator '=$' for types 'int4' and 'int4' you will either
> have to retype this query using and explicit cast, or you will have
> to define the operator using CREATE OPERATOR'

OK - in your other post you identified the problem as the above select
... into

I've tried to reproduce this in 7.1beta and can't (sorry don't have 6.5
to hand). On the other hand I can't spot any references to bug fixes in CHANGES.

You _must_ have and = operator for int4,int4 or you'd have noticed - you
can try a cast on the sum()

select sum(stomin)::int4 into suma ...

My guess is though that this is a bug in 6.5.x that has been fixed for
series 7 and I just couldn't spot it in the changes list.

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message J.H.M. Dassen Ray 2001-03-19 07:57:47 Re: IDE or RAD tools
Previous Message Poul L. Christiansen 2001-03-19 07:29:17 Re: Re: Migrating from MS SQL 7