hi,
i have some tables:
create table person (nr int4, name varchar(50));
create table book(nr int4, title varchar(50), persnr int4);
(persnr is the foreign key -> person.nr)
now i have some
CREATE FUNCTION get_new_nr(**TABLE**,**FIELDS**) RETURNS int4;
AS 'SELECT MAX($2) FROM $1 +1;'
LANGUAGE 'sql';
but **table** and **fields** needs some datatype. this function should
return the max of a set of all numbers in person (+1) and return this.
is it possible (and how ;-) to write such a very _flexible_ function??
MArtin