Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 619A26327E1 for ; Thu, 30 Jul 2009 12:26:01 -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 56817-05 for ; Thu, 30 Jul 2009 15:25:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mail.postgresql.org (Postfix) with ESMTP id AC60E63244F for ; Thu, 30 Jul 2009 12:25:50 -0300 (ADT) Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtp (Exim 4.62) (envelope-from ) id 1MWXVs-0000Q4-N6; Thu, 30 Jul 2009 09:25:48 -0600 Received: from [208.187.158.94] (helo=[172.16.1.29]) by in02.mta.xmission.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MWXVs-0001y3-2v; Thu, 30 Jul 2009 09:25:48 -0600 Message-ID: <4A71BB7A.4050901@gmail.com> Date: Thu, 30 Jul 2009 09:25:46 -0600 From: Rob Sargent User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Jasmin Dizdarevic CC: Axe , pgsql-sql@postgresql.org References: <2981e447-3f11-4002-92fb-06a6af39762e@c29g2000yqd.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-XM-SPF: eid=; ; ; mid=; ; ; hst=in02.mta.xmission.com; ; ; ip=208.187.158.94; ; ; frm=robjsargent@gmail.com; ; ; spf=neutral X-SA-Exim-Connect-IP: 208.187.158.94 X-SA-Exim-Rcpt-To: jasmin.dizdarevic@gmail.com, info@axier.se, pgsql-sql@postgresql.org, robjsargent@gmail.com X-SA-Exim-Mail-From: robjsargent@gmail.com X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Jasmin Dizdarevic X-Spam-Relay-Country: Subject: Re: Tweak sql result set... ? X-SA-Exim-Version: 4.2.1 (built Thu, 25 Oct 2007 00:26:12 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-10 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/153 X-Sequence-Number: 32894 I agree. All clients issue the same sql and deal with it as they will. The psql client for example can format the results in various ways (pset variations etc). Your client(s) need(s) to interpret their identical results differently. Doesn't seem to me to be the job of SQL? Jasmin Dizdarevic wrote: > i think jasen is thinking of manipulating the result set in your > programming 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 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. > > > > 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 > > > > > -- > Mit freundlichen Grüßen > > Dizdarevic Jasmin > Sonnenbergstr. 3 > 6714 Nüziders, AUT > > jasmin.dizdarevic@gmail.com > +43 664 411 79 29 >