I guess it depends on what you're using it for -- disk space is cheap and
abundant anymore, I can see some advantages of having it computed only once
rather than X times, where X is the number of SELECTs as that could get
costly on really high traffic servers.. Costly not so much for simple
computations like that but more complex ones.
Just playing the devil's advocate a bit.
----- Original Message -----
From: "Zeugswetter Andreas SB" <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Ross J. Reedstrom'" <reedstrm(at)rice(dot)edu>;
Sent: Tuesday, November 28, 2000 7:50 AM
Subject: AW: [HACKERS] Please advise features in 7.1 (SUMMARY)
> > > This is a summary of replies.
> > >
> > > 1. Calculated fields in table definitions . eg.
> > >
> > > Create table test (
> > > A Integer,
> > > B integer,
> > > the_sum As (A+B),
> > > );
> > >
> > > This functionality can be achieved through the use of views.
> > Using a view for this isn't quite the same functionality as a computed
> > field, from what I understand, since the calculation will be done at
> > SELECT time, rather than INSERT/UPDATE.
> I would expect the calculated field from above example to be calculated
> during select time also, no ? You don't want to waste disk space with
> you can easily compute at runtime.
In response to
pgsql-hackers by date
|Next:||From: Zeugswetter Andreas SB||Date: 2000-11-28 17:11:53|
|Subject: AW: Please advise features in 7.1 (SUMMARY)|
|Previous:||From: Ross J. Reedstrom||Date: 2000-11-28 16:54:54|
|Subject: Re: Please advise features in 7.1 (SUMMARY)|