Re: Common question: what's wrong

From: John DeSoi <desoi(at)pgedit(dot)com>
To: przygoda(at)klub(dot)chip(dot)pl
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Common question: what's wrong
Date: 2005-01-15 13:37:57
Message-ID: AA981ABA-66FA-11D9-8B4B-000A95B03262@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Jan 13, 2005, at 8:32 AM, przygoda(at)klub(dot)chip(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Terry Lee Tucker 2005-01-15 13:55:59 Re: Common question: what's wrong
Previous Message sarlav kumar 2005-01-14 20:32:30 Re: SQL from shell script