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 f2IJhDx54051 for ; Sun, 18 Mar 2001 14:43:13 -0500 (EST) (envelope-from pgsql-admin-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 f2H5emx09715 for ; Sat, 17 Mar 2001 00:40:48 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2H5Eap49933 for pgsql-admin@postgresql.org; Sat, 17 Mar 2001 00:14:36 -0500 (EST) (envelope-from news) From: jreniz X-Newsgroups: comp.databases.postgresql.admin Subject: trigger problem! Date: Sat, 17 Mar 2001 00:19:35 -0500 Organization: Reniz Co. Lines: 26 Message-ID: <3AB2F3E6.D9D73FF8@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 To: pgsql-admin@postgresql.org X-Archive-Number: 200103/132 X-Sequence-Number: 980 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)