Re: Case Statements in Rules?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bryan(dot)encina(at)valleypres(dot)org
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Case Statements in Rules?
Date: 2003-04-14 23:19:15
Message-ID: 2332.1050362355@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Bryan Encina" <bryan(dot)encina(at)valleypres(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-04-14 23:30:15 Re: viewing rules
Previous Message Juliet May 2003-04-14 22:04:41 viewing rules