Re: Re: Date of creation and of change

Поиск
Список
Период
Сортировка
От hlefebvre
Тема Re: Re: Date of creation and of change
Дата
Msg-id 39A68038.9783106@lexbase.net
обсуждение исходный текст
Ответ на Re: Date of creation and of change  (Andreas Tille <tillea@rki.de>)
Список pgsql-sql

Andreas Tille wrote:
> 
> On Fri, 25 Aug 2000, hlefebvre wrote:
> 
> > No I suppose that the problem is the identifier "changedat" is unknown.
> >
> > You must probably prefix it : NEW.changedat
> >
> >  CREATE FUNCTION changed_at_timestamp() RETURNS OPAQUE AS '
> >      BEGIN
> >          NEW.ChangedAt := timestamp(''now'');
> >          RETURN NEW;
> >      END;
> >  ' LANGUAGE 'plpgsql';
> >
> > I didn't test it, but as pgSQL looks like Oracle, it should be ok :-)
> This avoids the error message, but doesn't have any effect to the value
> of ChangedAt.  It just remains the same as CreatedAt :-(.
> 

I tried... 
I fact it seems that it doesn'nt work if you don't use the changedat
column in your UPDATE our insert statement. Just put null, and it will
be ok I think.


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

Предыдущее
От: Andreas Tille
Дата:
Сообщение: Re: Date of creation and of change
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Date of creation and of change