Hi all,
I did some Trigger to set default values for each row interted.
so, I'm using NEW.ID = NEXTVAL(''products_id_seq'');
but the column do not assum this value...
must I execute any other command before to set a value for NEW?
CREATE OR REPLACE FUNCTION "f_products"() RETURNS "opaque" AS '
BEGIN
NEW.ID = NEXTVAL(''products_id_seq'');
RETURN NEW;
END' LANGUAGE 'plpgsql'
CREATE TRIGGER "t_classes" AFTER INSERT ON "products" FOR EACH ROW EXECUTE
PROCEDURE f_products();
Roberto de Amorim +55 48 346-2243
Software engineer at SmartBit Software
roberto(at)smartbit(dot)inf(dot)br