Re: Stored procedure - change columns in a table that is

From: Joe Conway <mail(at)joeconway(dot)com>
To: bryan(at)flyingiranch(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-novice(at)postgresql(dot)org
Subject: Re: Stored procedure - change columns in a table that is
Date: 2003-03-09 00:18:38
Message-ID: 3E6A885E.9020101@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

bryan(at)flyingiranch(dot)com wrote:
> Next question: One of the reasons a function is attractive to me in this
> situation is that I also have some conditionals to handle. For instance,
> Base Metabolic Rate is different whether you are male or female (gender
> is a boolean value in my table). Can I use IF/THEN syntax in a view
> definition?

Take a look at the CASE conditional expression:
http://developer.postgresql.org/docs/postgres/functions-conditional.html

HTH,

Joe

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2003-03-09 00:24:06 Re: String manipulation in plpgsql
Previous Message Rod Kreisler 2003-03-08 23:32:29 String manipulation in plpgsql