Re: Date of creation and of change

From: Andreas Tille <tillea(at)rki(dot)de>
To: hlefebvre <hlefebvre(at)lexbase(dot)net>
Cc: PostgreSQL SQL <pgsql-sql(at)hub(dot)org>
Subject: Re: Date of creation and of change
Date: 2000-08-25 13:02:28
Message-ID: Pine.LNX.4.21.0008251501070.716-100000@wr-linux02.rki.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 :-(.

Kind regards

Andreas.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-08-25 14:14:48 Re: Re: Date of creation and of change
Previous Message hlefebvre 2000-08-25 11:48:45 Re: Re: Date of creation and of change