default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP - Mailing list pgsql-novice

From f g
Subject default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
Date
Msg-id 20060123134958.72090.qmail@web26114.mail.ukl.yahoo.com
Whole thread Raw
Responses Re: default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
with mysql you can do:

CREATE TABLE [table]
...
stamp timestamp NOT NULL default CURRENT_TIMESTAMP on
update CURRENT_TIMESTAMP,
...

but with pgsql it seems you need to do a trigger:

CREATE RULE [rule] AS ON UPDATE TO [table] DO UPDATE
[table] SET stamp = CURRENT_TIMESTAMP \g

which give you:

ERROR:  infinite recursion detected in rules for
relation [table]

what's the trick???






___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et
l'international.
Téléchargez sur http://fr.messenger.yahoo.com

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Forums
Next
From: "A. Kretschmer"
Date:
Subject: Re: default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP