Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group