Trigger problem

From: jreniz <jreniz(at)tutopia(dot)com>
To: pgsql-hackers(at)postgresql(dot)org(dot)pgsql-admin(at)postgresql(dot)org(dot)pgsql-docs(at)postgresql(dot)org(dot)pgsql-general(at)postgresql(dot)org(dot)pgsql-interfaces(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: Trigger problem
Date: 2001-03-17 05:22:44
Message-ID: 3AB2F4A4.41255255@tutopia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general pgsql-hackers pgsql-interfaces pgsql-sql

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)

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Roberto Mello 2001-03-18 15:51:54 Re: [SQL] Select very slow...
Previous Message Thomas Lockhart 2001-03-17 01:55:33 Re: Revamped PL/pgSQL Docs (corrected)

Browse pgsql-general by date

  From Date Subject
Next Message Anand Raman 2001-03-17 05:32:51 Re: pg_dump not working..
Previous Message Bruce Momjian 2001-03-17 05:13:37 New PostgreSQL session monitor

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-03-17 08:36:38 pg_dump
Previous Message Bruce Momjian 2001-03-17 03:13:48 Re: pg_upgrade

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2001-03-17 21:58:25 Re: Problem building PL/Perl
Previous Message Creager, Robert S 2001-03-17 01:45:40 Problem building PL/Perl

Browse pgsql-sql by date

  From Date Subject
Next Message Fernando Eduardo B. L. e Carvalho 2001-03-18 09:15:42 Select very slow...
Previous Message Roberto Mello 2001-03-17 00:41:49 Re: [SQL] Contribute to the PL/pgSQL CookBook !!