Re: function on trigger

From: Marcos Hercules Santos <mhercs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: function on trigger
Date: 2011-09-01 11:49:29
Message-ID: dee541b8-ce66-440f-9de9-a7e704d0e802@c19g2000yqe.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Aug 31, 7:39 pm, Marcos Hercules Santos <mhe(dot)(dot)(dot)(at)gmail(dot)com> wrote:
> hi guys
>
> I'm newbie in Psql and I'm trying to build one function  in order to
> count the products for each supplier. So i'm gonna put it quite simply
> though this example
>
> Please, consider a table called books with the following fields
>
> bookid, title, price, idPublisher
>
> and one another table called publisher
>
> Idpublisher, name, city, Books
>
> Being in that last field from Publisher, called book, I gotta have the
> amount of published books for each publisher.

sorry guys,

the last field in the publisher table is for the amount of books
published by each Publisher

Idpublisher, name, city, Books, amount_Books_

Guys, I'm discarding creating any view.

I already have the query to count the data, but my problem is how to
insert this data in the amount_books_ using function...

thank goodness for the reply

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2011-09-01 11:53:39 Re: [GENERAL] documentation suggestion
Previous Message Scott Marlowe 2011-09-01 11:31:42 Re: strange table disk sizes