From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Joseph Shraibman <jks(at)selectacast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Re: new type proposal |
Date: | 2001-02-07 00:01:04 |
Message-ID: | Pine.BSF.4.21.0102061552080.45220-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 6 Feb 2001, Joseph Shraibman wrote:
> Alex Pilosov wrote:
> >
> > On Tue, 6 Feb 2001, Dan Wilson wrote:
> >
> > > What would this do that would be non-standard? Does the SERIAL datatype add
> > > something that is not standard? No... it just allows for an easy way to
> > > implement something that is standard. The SERIAL "type" isn't really a
> > > datatype, it's just a keyword that allows you to automatically specify an
> > > int4 column with a related sequence and default. I don't see why the same
> > > thing couldn't be done with TIMESTAMP!
> > Such way the madnesssH^H^H^Hmysql lies ;)
> >
> > I firmly believe that people who need that feature should implement it
> > themselves via triggers, and rest of us shouldn't suffer from the code
> > bloat resulting to support this.
>
> I noticed that people are ignoring the time created part of my
> proposal. How can a read only field be implemented? A trigger that
> causes and error if that field is updated?
That'd be one way of doing it, if the value is modified to
something distinct raise an exception...
'begin
if (NEW.b!=OLD.b) then
RAISE EXCEPTION ''...''';
end if;
return NEW;
end;'
From | Date | Subject | |
---|---|---|---|
Next Message | Matt Friedman | 2001-02-07 00:03:21 | Table Locked - removing lock |
Previous Message | Dan Wilson | 2001-02-06 23:58:13 | Re: Re: new type proposal |