From: | Tim Uckun <tim(at)diligence(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: new type proposal |
Date: | 2001-02-07 08:21:48 |
Message-ID: | 4.2.0.58.20010207000607.00a800b8@mail.diligence.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>
> > MS sql server has a TIMESTAMP field which acts exactly like LAST_MODIFIED
> > type you proposed. I find this field very handy when attempting to
> > synchronize data. I would welcome such a field type in postgres.
> >
>
>There already is something called timestamp, and I thought it was a sql
>standard type.
MS SQL server has a different terminology I think. They use DATETIME to
indicate the equavalent of a postgres TIMESTAMP. In sql server timestamp is
a read only type that is set by the server. Anytime the row is updated or
on insert it puts in a timestamp.
Some people have indicated that perhaps this does not belong in the core
because it's easily achieved with triggers and I think they have a point
but maybe what's really needed are domains. Not just your average every day
domains but supercool domains with triggers!.
that way you can define a domain called UPDATED using a timestamp field and
a insert or an update trigger perhaps even a default value or a check. This
would make it easier to insert the same rules and triggers into every table
just by adding a field with the defined domain.
Interbase support domains which let you define checks and defaults but not
triggers. I know this kind of grandiose but it would be cool.
----------------------------------------------
Tim Uckun
Mobile Intelligence Unit.
----------------------------------------------
"There are some who call me TIM?"
----------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2001-02-07 08:24:31 | Re: Re: new type proposal |
Previous Message | Ed Loehr | 2001-02-07 06:57:20 | Off-topic: usenet sources? |