Re: Rules and conditions - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: Rules and conditions
Date
Msg-id 200912090906.12976.guillaume@lelarge.info
Whole thread Raw
In response to Rules and conditions  (George Silva <georger.silva@gmail.com>)
Responses Re: Rules and conditions
List 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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Excessive (and slow) fsync() within single transaction
Next
From: Dan Kortschak
Date:
Subject: Re: how to ensure a client waits for a previous transaction to finish?