Re: abs() does not exists..

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: mazzo <jambo(at)aruba(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: abs() does not exists..
Date: 2001-06-12 22:09:57
Message-ID: Pine.BSF.4.21.0106121507410.55842-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Trigger functions take no arguments (their arguments
are passed in differently) and return opaque.
That's why it's looking for abs() rather than
abs(<type>).

Write a plpgsql trigger function that makes the
change to the value.

On Tue, 12 Jun 2001, mazzo wrote:

> Hi all..i'm trying to create a trigger that fires before i insert a
> value into a column and if the value i insert is negative, it will
> change it to positive... I was trying with:
>
> create trigger postv before insert on my_table for each row execute
> procedure abs (column);
>
> But this doesn't seem to work and gives me the error i wrote in the
> subject...
>
> Can anyone help me out please..?? Sorry if i post here but i looked on
> deja.com but i didn't find anything..
>
> Thanks in advance..
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-12 22:11:42 Re: abs() does not exists..
Previous Message Martin Weinberg 2001-06-12 21:49:08 Merge join exhausting swap space