Re: Options for complex materialized views sharing most of the same logic?

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Options for complex materialized views sharing most of the same logic?
Date: 2015-12-27 22:12:33
Message-ID: EDB8C028-9DD3-4733-A67B-3B447267BCD8@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Maybe you can create a so called SRF - Funktion (Set Returning Funktion) with proper parameters to use AS 'create materialized view ... AS select * Form your_srf_Funktion(param1,param2,...,paramN). Untested, but i think it should work.

(stupid smartphone-app ...)

Am 27. Dezember 2015 23:04:07 MEZ, schrieb Wells Oliver <wells(dot)oliver(at)gmail(dot)com>:
>I do not. I just probably tweak it a couple of times a week due to
>adding/removal of columns of interest and I just would like to have the
>logic in one place if possible...
>
>On Sun, Dec 27, 2015 at 4:03 PM, Andreas Kretschmer
><andreas(at)a-kretschmer(dot)de
>> wrote:
>
>> Do you recreate the views every day? Why?
>>
>> (stupid smartphone-app, sorry for top-posting)
>>
>> Am 27. Dezember 2015 22:39:58 MEZ, schrieb Wells Oliver <
>> wells(dot)oliver(at)gmail(dot)com>:
>> >
>> >Is there some easier way for me to maintain the structure of the
>view
>> >without copying/pasting it 4 times and making one small tweak? I
>find
>> >myself adding/removing columns to these views and I do it 4 times
>>
>> --
>> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
>> gesendet.
>>
>
>
>
>--
>Wells Oliver
>wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hiroyuki Sato 2015-12-27 23:53:38 Re: grep -f keyword data query
Previous Message Wells Oliver 2015-12-27 22:04:07 Re: Options for complex materialized views sharing most of the same logic?