Re: Stored procedure - change columns in a table that is - Mailing list pgsql-novice

From Joe Conway
Subject Re: Stored procedure - change columns in a table that is
Date
Msg-id 3E6A885E.9020101@joeconway.com
Whole thread Raw
In response to Re: Stored procedure - change columns in a table that is being updated / inserted on?  (bryan@flyingiranch.com)
Responses Re: Stored procedure - change columns in a table that is
List pgsql-novice
bryan@flyingiranch.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


pgsql-novice by date:

Previous
From: "Rod Kreisler"
Date:
Subject: String manipulation in plpgsql
Next
From: Joe Conway
Date:
Subject: Re: String manipulation in plpgsql