From: Tim Landscheidt <tim@tim-landscheidt.de>
To: pgsql-sql@postgresql.org
Subject: Re: Tweak sql result set... ?
Date: Thu, 30 Jul 2009 14:19:08 +0000
Message-ID: <m34osu2qzn.fsf@passepartout.tim-landscheidt.de> (raw)
References: <2981e447-3f11-4002-92fb-06a6af39762e@c29g2000yqd.googlegroups.com>
<m3k51s72vl.fsf@passepartout.tim-landscheidt.de>
<b0fab1d4-841f-4df9-b201-1cc7918f12f6@h11g2000yqb.googlegroups.com>
(anonymous) wrote:
>> > Any ideas on how to achieve this? I would like to let the original sql
>> > code stay original. I can prepare postgres before executing the sql if
>> > this makes it easier to acheive the goal
>> Have a look at CREATE RULE.
> Ok, you mean I could create a rule for the table, then I let the
> script go into my "black box",
> do the original selects, but get a manipulated result set back, then I
> drop the rule so
> that the blackbox of scripts can get the not manipulated result set
> back?
No, I meant that you should have a look at CREATE RULE. From
a design perspective, I'd probably rename the old table and
put an updatable view in its place.
> I need to sometimes get the result "<div>output from query</div>" and
> sometimes not
> and it would be awesomw to get it with the same query, but maybe by
> setting
> a rule or similar. Best from performance view would be to make
> something
> more permanent. Is it possible to activate/deactivate a rule?
Of course, DROP RULE.
Tim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tim@tim-landscheidt.de
Subject: Re: Tweak sql result set... ?
In-Reply-To: <m34osu2qzn.fsf@passepartout.tim-landscheidt.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox