Common question: what's wrong

Поиск
Список
Период
Сортировка
От przygoda@klub.chip.pl
Тема Common question: what's wrong
Дата
Msg-id 55972.213.77.90.234.1105623174.squirrel@klub.chip.pl
обсуждение исходный текст
Ответы Re: Common question: what's wrong
Re: Common question: what's wrong
Список pgsql-novice
This is a trigger function:

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;

There is an error near DEFAULT when firing trigger (on insert)
How can I set defaults without doing INSERT INTO 'g_oferta' (DEFAULT, NEW...?

Martin

В списке pgsql-novice по дате отправления:

Предыдущее
От: sarlav kumar
Дата:
Сообщение: Re: SQL from shell script
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: postgresql or mysql or oracle?