Re: Calculated view fields (8.1 != 8.2)

From: Gaetano Mendola <gmendola(at)mbigroup(dot)it>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Calculated view fields (8.1 != 8.2)
Date: 2007-03-12 13:01:05
Message-ID: 45F54F11.6030708@mbigroup.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Lane wrote:
> Gaetano Mendola <gmendola(at)mbigroup(dot)it> writes:
>> I can immagine a case when a lower module exports a view to upper layer stating
>> the interface as list of fields:
>
>> first_name, last_name, ....
>
>> with an *hidden* field that is a function call that updates the statistics on
>> how many time a given record was selected, then this technique can not be used
>> anymore starting with 8.2.x.
>
> You're living in a dream world if you think that works reliably in *any*
> version of Postgres. But for starters, what is your definition of
> "selected" --- pulled from the physical table? Accumulated into an
> aggregate? Delivered as a recognizable row to the client? Delivered N
> times to the client due to joining N times to some other table?

Well that was a not good example, I don't have any problem in mark from now
on all my function as stable/immutable (the one I use on views) but still
I believe is source of bad performance evaluate a function on rows discarded and
at same time this break the principle of least surprise.

Regards
Gaetano Mendola

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF9U8R7UpzwH2SGd4RAhoGAKDSpUSQ3lGEdIdFWLwQjxoZXUAS1ACdGtht
TZg9BKScbzGO0MzpHy0Gr80=
=auwk
-----END PGP SIGNATURE-----

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-03-12 13:21:10 Re: Synchronized Scan update
Previous Message Heikki Linnakangas 2007-03-12 12:53:09 Re: Grouped Index Tuples / Clustered Indexes