Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f2IJhfx54113 for ; Sun, 18 Mar 2001 14:43:41 -0500 (EST) (envelope-from pgsql-docs-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2H5enx09720; Sat, 17 Mar 2001 00:40:49 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2H5HWM49980; Sat, 17 Mar 2001 00:17:32 -0500 (EST) (envelope-from news) From: jreniz X-Newsgroups: comp.databases.postgresql.general, comp.databases.postgresql.admin, comp.databases.postgresql.docs, comp.databases.postgresql.hackers, comp.databases.postgresql.interfaces, comp.databases.postgresql.novice, comp.databases.postgresql.sql, comp.databases.postgresql.questions Subject: Trigger problem Date: Sat, 17 Mar 2001 00:22:44 -0500 Organization: Reniz Co. Lines: 26 Message-ID: <3AB2F4A4.41255255@tutopia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en X-Priority: 1 (Highest) To: pgsql-hackers@postgresql.org.pgsql-admin@postgresql.org.pgsql-docs@postgresql.org.pgsql-general@postgresql.org.pgsql-interfaces@postgresql.org.pgsql-sql@postgresql.org X-Archive-Number: 200103/84 X-Sequence-Number: 517 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)