SQL QUERY - Mailing list pgsql-sql

From Pedro Igor
Subject SQL QUERY
Date
Msg-id 001001c29ac9$8f8de3e0$0b00010a@aip.com.br
Whole thread Raw
Responses Re: SQL QUERY  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
I have the following function:

CREATE FUNCTION public.auto_incremento() RETURNS trigger AS '
begin
new.id = (
select (max(id) + 1) from teste);
return new;
end;'
LANGUAGE 'plpgsql'

I created a trigger that uses this function, but i want to the function be usefull for all tables and not only to tbale teste.

Someone know how ???

 

Pedro Igor

 

pgsql-sql by date:

Previous
From: Thrasher
Date:
Subject: Re: Date trunc in UTC
Next
From: Achilleus Mantzios
Date:
Subject: Re: SQL QUERY