Re: Common question: what's wrong - Mailing list pgsql-novice

From John DeSoi
Subject Re: Common question: what's wrong
Date
Msg-id AA981ABA-66FA-11D9-8B4B-000A95B03262@pgedit.com
Whole thread Raw
In response to Common question: what's wrong  (przygoda@klub.chip.pl)
List pgsql-novice
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


pgsql-novice by date:

Previous
From: Christopher Browne
Date:
Subject: Re: postgresql or mysql or oracle?
Next
From: Terry Lee Tucker
Date:
Subject: Re: Common question: what's wrong