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

Anonymous code blocks

From: Mike Ellsworth <younicycle(at)gmail(dot)com>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Anonymous code blocks
Date: 2009-11-23 15:01:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Reading through 'Anonymous Code Blocks' and DO statement to be in 8.5
& it isn't clear to me if user expressions could take advantage of it
- or not.

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.','')

would it be possible - or is that off into lambda calculus discussion
that seems to be an associated thread?

No apologies for the question.  After all, it is Novice. :-)
Mike Ellsworth


pgsql-novice by date

Next:From: richard terryDate: 2009-11-23 20:49:08
Subject: Re: Postgres blob question - insert from basic.
Previous:From: Jean-Yves F. BarbierDate: 2009-11-23 14:05:20
Subject: Re: Postgres blob question - insert from basic.

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