Search Postgresql Archives

What is the problem with this query?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux