Re: Tweak sql result set... ?

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Jasmin Dizdarevic <jasmin(dot)dizdarevic(at)gmail(dot)com>
Cc: Axe <info(at)axier(dot)se>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Tweak sql result set... ?
Date: 2009-07-30 15:25:46
Message-ID: 4A71BB7A.4050901@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)axier(dot)se <mailto:info(at)axier(dot)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(at)postgresql(dot)org
> <mailto:pgsql-sql(at)postgresql(dot)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(dot)dizdarevic(at)gmail(dot)com <mailto:jasmin(dot)dizdarevic(at)gmail(dot)com>
> +43 664 411 79 29
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daryl Richter 2009-07-30 15:33:59 Re: Foreign keys and fixed values...
Previous Message Rob Sargent 2009-07-30 15:16:35 Re: SQL report