Re: Anonymous code blocks - Mailing list pgsql-novice

From Joshua Tolley
Subject Re: Anonymous code blocks
Date
Msg-id 20091125223412.GF3803@eddie
Whole thread Raw
In response to Anonymous code blocks  (Mike Ellsworth <younicycle@gmail.com>)
List 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

Attachment

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Column aliases for GROUP BY and HAVING
Next
From: Kris Kewley
Date:
Subject: Re: Column aliases for GROUP BY and HAVING