Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9E5C8632F61 for ; Thu, 30 Jul 2009 04:53:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97691-01 for ; Thu, 30 Jul 2009 07:53:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mail.postgresql.org (Postfix) with ESMTP id C019C632913 for ; Thu, 30 Jul 2009 04:53:02 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id e12so356834fga.0 for ; Thu, 30 Jul 2009 00:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=X3bhvmGsPYWU2MBLRcwzLxbPcjj7nQHZ07rggU0utCA=; b=ubny0/THtGCOTddlqW7M1HLOgUOt1R51lTKZi7ModK49NrRYIeVEwaTyWeRBOTBqzM 4B4zixAPoDikKhdgCTTcXY3jIZLvom/0r8aTt+6Kr4HI3Yx5mnLFqIEbbitpYKJ+ALuG AAolIitqqKaQ8ZVfs1tWPa0DZ/Y9r4jDuvkG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=qKdDxxIJDZfpS0/ramE2FBxN6729PpdI8F3F+9Ouu7ThoJhgSzNQGW5mC3/KQATV8z ZzbmrojHATvIZhREetQeGLTbulNTumaQZPOMH4OI9Mc9lfRjFv1pl2BBnVkQEarioWBd 1SMEvxdKTi/bwhD3rgD8ty8Y4G0i+MWflN98U= MIME-Version: 1.0 Received: by 10.86.54.1 with SMTP id c1mr318423fga.23.1248940381048; Thu, 30 Jul 2009 00:53:01 -0700 (PDT) In-Reply-To: References: <2981e447-3f11-4002-92fb-06a6af39762e@c29g2000yqd.googlegroups.com> Date: Thu, 30 Jul 2009 09:53:01 +0200 Message-ID: Subject: Re: Tweak sql result set... ? From: Jasmin Dizdarevic To: Axe , pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd2421ec20fd8046fe797b6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200907/149 X-Sequence-Number: 32890 --000e0cd2421ec20fd8046fe797b6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable i think jasen is thinking of manipulating the result set in your programmin= g enviroment not in the database. btw from the point of "clean programming" it's a bad idea to integrate html-elements directly into your database quereis. you're mixing data layer and design layer. what do you mean with sometimes? 2009/7/29 Axe > > > > Any ideas on how to achieve this? I would like to let the original sq= l > > > code stay original. I can prepare postgres before executing the sql i= f > > > this makes it easier to acheive the goal > > > > Have a look at CREATE RULE. > > > > Tim > > > 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? > > I need to sometimes get the result "
output from query
" 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? > > Axe > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > --=20 Mit freundlichen Gr=FC=DFen Dizdarevic Jasmin Sonnenbergstr. 3 6714 N=FCziders, AUT jasmin.dizdarevic@gmail.com +43 664 411 79 29 --000e0cd2421ec20fd8046fe797b6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
i think jasen is thinking of manipulating the result set in your progr= amming enviroment not in the database.
btw from the point of "clean programming" it's a bad ide= a to integrate html-elements directly into your database quereis. you'r= e mixing data layer and design layer.
=A0
what do you mean with sometimes?
2009/7/29 Axe <info@axier.se>

> > Any ideas on how to achieve this? I would l= ike to let the original sql
> > code stay original. I can prepare = postgres before executing the sql if
> > this makes it easier to a= cheive the goal
>
> Have a look at CREATE RULE.
>
> Tim
>
Ok, you mean I could create a rule for the table, then I let the
scri= pt 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 manipulate= d result set
back?

I need to sometimes get the result "<d= iv>output from query</div>" and
sometimes not
and it wo= uld be awesomw to get it with the same query, but maybe by
setting
a rule or similar. Best from performance view would be to makesomething
more permanent. Is it possible to activate/deactivate a rule= ?

Axe

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make chan= ges to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



--
Mit freundlichen Gr=FC=DFen

Dizdarevic Jasmin<= br>Sonnenbergstr. 3
6714 N=FCziders, AUT

jasmin.dizdarevic@gmail.com
+43 664 411 79 29=

--000e0cd2421ec20fd8046fe797b6--