Re: abs() does not exists..

Поиск
Список
Период
Сортировка
Искать
От
Rob Arnold
Тема
Re: abs() does not exists..
Дата
Msg-id
001801c0f462$8acd5a20$4901010a@canrion.net
Список
Дерево обсуждения
abs() does not exists.. "mazzo" <jambo@aruba.it>
Re: abs() does not exists.. Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: abs() does not exists.. Peter Eisentraut <peter_e@gmx.net>
Re: abs() does not exists.. Bruno Wolff III <bruno@wolff.to>
How about a trigger/function that does this:

if val < 0 then val = val * -1

--rob

----- Original Message -----
From: "Bruno Wolff III" 
To: "Peter Eisentraut" 
Cc: "mazzo" ; 
Sent: Wednesday, June 13, 2001 10:45 AM
Subject: Re: abs() does not exists..


> On Wed, Jun 13, 2001 at 12:11:42AM +0200,
>   Peter Eisentraut  wrote:
> > mazzo writes:
> >
> > > 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...
>
> Couldn't you do this using a rule to update the table and a constraint on
> the table to prevent bad data from getting into the table without using
the
> rule?
>

В списке pgsql-general по дате отправления
От: Nicolas Huillard
Дата:
От: Tom Lane
Дата:
FAQ