[GENERAL] What is the problem with this query? - Mailing list pgsql-general

From Igor Korot
Subject [GENERAL] What is the problem with this query?
Date
Msg-id CA+FnnTyGHBKZeTRNrR780TF51uPaRyT=apNgX=QaBwfbp7H94w@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] What is the problem with this query?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hi, ALL,

draft=# IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_namespace n WHERE
n.oid = c.relnamespace AND c.relname = 'abcattbl_tnam_ownr' AND
n.nspname = 'public' ) THEN CREATE INDEX "abcattbl_tnam_ownr" ON
"abcattbl"("abt_tnam" ASC, "abt_ownr" ASC);
ERROR:  syntax error at or near "IF"
LINE 1: IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_namespace n WHER...
        ^

Is "IF" operator not supported by PostgreSQL?

Thank you.


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [GENERAL] pg_dump not dropping event trigger
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] What is the problem with this query?