Re: function on trigger - Mailing list pgsql-general

From Marcos Hercules Santos
Subject Re: function on trigger
Date
Msg-id dee541b8-ce66-440f-9de9-a7e704d0e802@c19g2000yqe.googlegroups.com
Whole thread Raw
In response to function on trigger  (Marcos Hercules Santos <mhercs@gmail.com>)
List pgsql-general
On Aug 31, 7:39 pm, Marcos Hercules Santos <mhe...@gmail.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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: md5 of table
Next
From: Antonio Vieiro
Date:
Subject: Memory leak somewhere at PQconnectdb?