Re: Anonymous code blocks

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Mike Ellsworth <younicycle(at)gmail(dot)com>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Anonymous code blocks
Date: 2009-11-25 22:34:12
Message-ID: 20091125223412.GF3803@eddie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Nov 23, 2009 at 10:01:59AM -0500, Mike Ellsworth wrote:
> If I wanted to use this new feature in user expressions so that:
>
> DO.this= round("ben_stmt"."base_pay") +
> round("ben_stmt"."incent_comp") + round("ben_stmt"."advance_ben_dol")
> + round("ben_stmt"."er_cont_other")
> DO.that = round(DO.this/12)
> DO.yada = if(DO.that < 1000, 'consider a vegetable garden.','')

I'm not sure I understand your question, but one thing springs to mind, namely
that as currently implemented these anonymous blocks can't return any data.

- Josh / eggyknap

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kris Kewley 2009-11-26 00:47:06 Re: Column aliases for GROUP BY and HAVING
Previous Message Tom Lane 2009-11-25 19:35:09 Re: Column aliases for GROUP BY and HAVING