Re: What is the problem with this query?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is the problem with this query?
Date: 2017-07-24 03:12:43
Message-ID: CAKFQuwZX8n1m0mW8K27LUHcG=okFyu6MjFzhzEMx11eKP0zFrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sunday, July 23, 2017, Igor Korot <ikorot01(at)gmail(dot)com> wrote:

> Hi, David,
>
> On Sun, Jul 23, 2017 at 5:07 PM, David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com <javascript:;>> wrote:
> > On Sunday, July 23, 2017, Igor Korot <ikorot01(at)gmail(dot)com <javascript:;>>
> wrote:
> >>
> >> Is "IF" operator not supported by PostgreSQL
>
> So how do I write this properly?
>
>
CREATE FUNCTION or a DO block. See docs for usage.

Since the language is pl/pgsql you can learn how to write it here.

https://www.postgresql.org/docs/9.6/static/plpgsql.html

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2017-07-24 07:02:57 Dealing with ordered hierarchies
Previous Message PT 2017-07-23 22:40:31 Re: Perfomance of IN-clause with many elements and possible solutions