Re: Case Statements in Rules? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Case Statements in Rules?
Date
Msg-id 2332.1050362355@sss.pgh.pa.us
Whole thread Raw
In response to Case Statements in Rules?  ("Bryan Encina" <bryan.encina@valleypres.org>)
List pgsql-novice
"Bryan Encina" <bryan.encina@valleypres.org> writes:
> which works fine, however I'd like to use a case statement on the second
> insert so that it only inserts if the signon_id is not null.

CASE is not the solution.  Do something like

    INSERT INTO target SELECT this, that, theother WHERE condition;

            regards, tom lane


pgsql-novice by date:

Previous
From: "Juliet May"
Date:
Subject: viewing rules
Next
From: Tom Lane
Date:
Subject: Re: viewing rules