pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Jasmin Dizdarevic <jasmin.dizdarevic@gmail.com>
Cc: Axe <info@axier.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: Tweak sql result set... ?
Date: Thu, 30 Jul 2009 09:25:46 -0600
Message-ID: <4A71BB7A.4050901@gmail.com> (raw)
In-Reply-To: <a0eee4d40907300053x1d19e1d8n52ece03dc9490dbb@mail.gmail.com>
References: <2981e447-3f11-4002-92fb-06a6af39762e@c29g2000yqd.googlegroups.com>
	<m3k51s72vl.fsf@passepartout.tim-landscheidt.de>
	<b0fab1d4-841f-4df9-b201-1cc7918f12f6@h11g2000yqb.googlegroups.com>
	<a0eee4d40907300053x1d19e1d8n52ece03dc9490dbb@mail.gmail.com>

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 <info@axier.se <mailto:info@axier.se>>
>
>
>     > > 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 "<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?
>
>     Axe
>
>     --
>     Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org
>     <mailto: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 <mailto:jasmin.dizdarevic@gmail.com>
> +43 664 411 79 29
>



view thread (9+ messages)  latest in thread

Message-ID: <4A71BB7A.4050901@gmail.com>
Permalink:  ../4A71BB7A.4050901@gmail.com/
Also on:    postgresql.org/message-id/4A71BB7A.4050901@gmail.com

 · 

reply

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: robjsargent@gmail.com, jasmin.dizdarevic@gmail.com, info@axier.se
  Subject: Re: Tweak sql result set... ?
  In-Reply-To: <4A71BB7A.4050901@gmail.com>

* 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