pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Trigger problem
2+ messages / 2 participants
[nested] [flat]

* Trigger problem
@ 2001-03-17 05:22  jreniz <jreniz@tutopia.com>
  0 siblings, 1 reply; 2+ messages in thread

From: jreniz @ 2001-03-17 05:22 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org.pgsql-admin

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)






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Trigger problem
@ 2001-03-18 20:37  Tom Lane <tgl@sss.pgh.pa.us>
  parent: jreniz <jreniz@tutopia.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2001-03-18 20:37 UTC (permalink / raw)
  To: jreniz <jreniz@tutopia.com>; +Cc: pgsql-hackers@postgreSQL.org

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-03-18 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-17 05:22 Trigger problem jreniz <jreniz@tutopia.com>
2001-03-18 20:37 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox