
> > 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 something 
you can easily compute at runtime.

Andreas

Tue, 28 Nov 2000 16:50:59 +0100
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
AW: Please advise features in 7.1  (SUMMARY)
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.

-Mitch

----- Original Message -----
From: "Zeugswetter Andreas SB" <ZeugswetterA@wien.spardat.at>
To: "'Ross J. Reedstrom'" <reedstrm@rice.edu>;
<pgsql-hackers@postgresql.org>
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
something
> you can easily compute at runtime.
>
> Andreas
>


Tue, 28 Nov 2000 09:05:29 -0800
"Mitch Vincent" <mitch@venux.net>
Re: Please advise features in 7.1  (SUMMARY)