On Jan 13, 2005, at 8:32 AM, przygoda@klub.chip.pl wrote:
> CREATE FUNCTION public.trigger_null2default() RETURNS trigger AS 'BEGIN
> IF TG_RELNAME = ''g_oferty'' THEN
> IF NEW.id_oferta ISNULL THEN
> NEW.id_oferta = DEFAULT ;
> END IF;
> END IF;
> RETURN NEW;
> END;' LANGUAGE 'plpgsql' IMMUTABLE;
I don't know if this will solve it, but the value assignment should use
":=" not "="
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL