IF NOT EXIST - Mailing list pgsql-general

From Igor Korot
Subject IF NOT EXIST
Date
Msg-id CA+FnnTyg6BZ0u+CCddbJLZoHF3HHSEvEt1xvWHF3b+jqPduEhg@mail.gmail.com
Whole thread Raw
Responses Re: IF NOT EXIST
Re: IF NOT EXIST
List pgsql-general
Hi, ALL,
I have a following statement:

IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS
ns ) CREATE FUNCTION();

Unfortunately trying to execute it thru the ODBC interface with:

ret = SQLExecDirect( m_hstmt, query, SQL_NTS );

gives syntax error near IF.

What is the proper way to do that?

Thank you.


pgsql-general by date:

Previous
From:
Date:
Subject: Re: Creating 2D arrays for pg_copy_from, reading tab-delimited textfile that contains comma and double quotes
Next
From: Pavel Stehule
Date:
Subject: Re: IF NOT EXIST