Re: Rules and conditions

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgsql-general(at)postgresql(dot)org
Cc: George Silva <georger(dot)silva(at)gmail(dot)com>
Subject: Re: Rules and conditions
Date: 2009-12-09 08:06:12
Message-ID: 200912090906.12976.guillaume@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le mercredi 9 décembre 2009 à 01:52:03, George Silva a écrit :
> [...]
> I can't seem to understand why a simples if is not working on the
> creation of rules.
>
> I tried both ways (am i missing something?):
>

Sure. IF does not exist in SQL, and you can only put SQL statements in a rule.
Instead, you can call a stored function written in PL/pgsql which supports IF
structure.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan Kortschak 2009-12-09 08:06:38 Re: how to ensure a client waits for a previous transaction to finish?
Previous Message Merlin Moncure 2009-12-09 05:40:22 Re: Excessive (and slow) fsync() within single transaction