Re: [HACKERS] expr ? trueval : falseval

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: brett(at)work(dot)chicken(dot)org (Brett McCormick)
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] expr ? trueval : falseval
Date: 1998-03-20 17:03:31
Message-ID: 199803201703.MAA07780@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> expr ? trueval : falseval
>
> if expr evaluated is true, the entire expression is trueval evaluated,
> otherwise it is falseval evaluated.
>
> Is it possible to have this sort of grammar logic in the parser?

Good question. Answer is no, I think, unless you can do some fancy
things with functions.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-20 17:06:55 Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
Previous Message Thomas G. Lockhart 1998-03-20 17:02:55 Re: [HACKERS] expr ? trueval : falseval