Re: Order of Rules

Поиск
Список
Период
Сортировка
От Michael Fork
Тема Re: Order of Rules
Дата
Msg-id Pine.BSI.4.21.0101301626370.14806-100000@glass.toledolink.com
обсуждение исходный текст
Ответ на Re: Order of Rules  (Nelio Alves Pereira Filho <nelio@ifx.com.br>)
Список pgsql-general
Here are some good references on using triggers:

http://www.postgresql.org/docs/aw_pgsql_book/node204.html
http://www.postgresql.org/users-lounge/docs/7.0/user/c40874113.htm

These docs show you how to create a trigger, and use the information
contained in the new tuple for calculations....

Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio

On Tue, 30 Jan 2001, Nelio Alves Pereira Filho wrote:

> Yes, but how can I pass a reference of the row just inserted to the
> trigger??
>
> adb wrote:
> >
> > Sounds like you need to use a trigger set to
> > fire after the insert on table A
> >
> > Alex.
> >
> > On Tue, 30 Jan 2001, Nelio Alves Pereira Filho wrote:
> >
> > > I read at the docs that rules are executed before the query that
> > > generated them. Is there any way to change this?
> > >
> > > Here's my problem: I have two tables, A and B, and after an INSERT on
> > > table A, I want to update an specific field on table B, with the result
> > > of a sum in A. To do this I needed some information about the row just
> > > inserted, so I used rules. As my sum is running before the insertion,
> > > its result is wrong.
> > >
> > > Any ideas?
> > >
> > > Tks
> > >
> > > --
> > > Nelio Alves Pereira Filho
> > > IFX Networks - www.ifx.com.br
> > > +55 11 3365-5863
> > > nelio@ifx.com.br
> > >
>
> --
> Nelio Alves Pereira Filho
> IFX Networks - www.ifx.com.br
> +55 11 3365-5863
> nelio@ifx.com.br
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Nelio Alves Pereira Filho
Дата:
Сообщение: Re: Order of Rules
Следующее
От: Culley Harrelson
Дата:
Сообщение: case insensitive unique index