pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hlefebvre <hlefebvre@lexbase.net>
To: Andreas Tille <tillea@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@hub.org>
Subject: Re: Re: Date of creation and of change
Date: Fri, 25 Aug 2000 16:18:32 +0200
Message-ID: <39A68038.9783106@lexbase.net> (raw)
References: <Pine.LNX.4.21.0008251501070.716-100000@wr-linux02.rki.de>



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.



view thread (15+ messages)  latest in thread

Message-ID: <39A68038.9783106@lexbase.net>
Permalink:  ../39A68038.9783106@lexbase.net/
Also on:    postgresql.org/message-id/39A68038.9783106@lexbase.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: hlefebvre@lexbase.net, tillea@rki.de, pgsql-sql@hub.org
  Subject: Re: Date of creation and of change
  In-Reply-To: <39A68038.9783106@lexbase.net>
  References: <Pine.LNX.4.21.0008251501070.716-100000@wr-linux02.rki.de> <39A68038.9783106@lexbase.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox