Hi friends!

I'm working in a trigger and I need to put the result
of a query into a variable.

That's very easy- apparently!

The query has a aggregate function like this:

select sum(field) into variable ...

and I'm sure that field and variable are int4 type.

So, when I run this trigger there is a mistake:
 ''there is no operator '=$' for types 'int4' and 'int4'
   you will either have to retype this query using an
   explicit cast, or you will have to define the operator
   using CREATE OPERATOR''

what's meaning this? and
how can I assign the result of aggregate function into a
variable?
(My system is 6.5.3)




Sat, 17 Mar 2001 00:22:44 -0500
jreniz <jreniz@tutopia.com>
Trigger problem
jreniz <jreniz@tutopia.com> writes:
> So, when I run this trigger there is a mistake:
>  ''there is no operator '=$' for types 'int4' and 'int4'

> (My system is 6.5.3)

This is an old bug.  Update to 7.0.3.

It might work to add spaces around the '=' signs in your trigger
function, but an update would be a good idea anyway.

			regards, tom lane

Sun, 18 Mar 2001 15:37:41 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Trigger problem 