Re: Controlling complexity in queries

From: Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com>
To: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Controlling complexity in queries
Date: 2011-12-15 09:53:04
Message-ID: CAKwGa_9khHpvnb1NtFNjfSG0rOaVGDEgy3gvFMad14XkVn+omg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

> Here the result of "SELECT * FROM test1v" depends on who issued the query.

As a more general case, I sometimes load parameters into a utility table,
and use them to dynamically restrict the view's output. Downside: it's a
multistatement operation... however, when wrapping complex queries into
functions gives the planner a bad time, this will solve the issue.

Bèrto

--
==============================
If Pac-Man had affected us as kids, we'd all be running around in a
darkened room munching pills and listening to repetitive music.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2011-12-15 11:22:49 Re: Philosophical question
Previous Message Andreas 2011-12-15 09:49:59 Re: Philosophical question