From: Pedro Igor <pedroigor@aip.com.br>
To: pgsql-sql@postgresql.org
Subject: SQL QUERY
Date: Tue, 3 Dec 2002 10:43:19 -0200
Message-ID: <001001c29ac9$8f8de3e0$0b00010a@aip.com.br> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pedroigor@aip.com.br
Subject: Re: SQL QUERY
In-Reply-To: <001001c29ac9$8f8de3e0$0b00010a@aip.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox