Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go8Bz-0004Mc-VD for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 14:47:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1go8By-0007gX-MJ for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 14:47:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go8By-0007gP-5i for pgsql-general@lists.postgresql.org; Mon, 28 Jan 2019 14:47:18 +0000 Received: from mout.gmx.net ([212.227.15.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go8Bv-0005hR-ER for pgsql-general@postgresql.org; Mon, 28 Jan 2019 14:47:17 +0000 Received: from hermes ([89.12.174.47]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoEwL-1hPNgd33hx-00gIWf for ; Mon, 28 Jan 2019 15:47:11 +0100 Received: from ncq by hermes with local (Exim 4.92-RC4) (envelope-from ) id 1go8Bn-00078N-MO for pgsql-general@postgresql.org; Mon, 28 Jan 2019 15:47:08 +0100 Date: Mon, 28 Jan 2019 15:47:07 +0100 From: Karsten Hilbert To: pgsql-general Subject: Re: multi-SQL command string aborts despite IF EXISTS Message-ID: <20190128144705.GE2141@hermes.hilbert.loc> Mail-Followup-To: pgsql-general References: <20190128112326.GB2141@hermes.hilbert.loc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.10.1 (2018-07-13) Sender: X-Provags-ID: V03:K1:1nNEaVX6+pM9RV83K72SnkIyg6vlB5E8E9pA7GKA35aOmYw+nO1 As1LbOwrKaZFivvz2q2LcAsHlqLeHQoOXv6mhoO3Pqgfwr88jxCQhQYnWaoP2yI3wA3sqQ5 PVDTEGw0W6oWvZFxPRwi1sQmWjrYYom40322ICEH8tgTJpSEPaCjRFc86XS2FiYArbyHDGV wVJas5+MztoDW+vzWViNw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:mNE4znU3HTE=:qWElCmm1/pC+3SW1Y5lryU Ybu9/Ysg1XBLkwOXNC9t7QXnv40d9gA98G1xO4xIK7siYQM4JoEJPVcFH0xN1/IyKkBXMBnM0 a3aLQiGlXbJuRijTykfAAnRzVnfWV0TFg+vtLLGLjirje1kLb4mn3bUvli+OxJLVLn5hR7EIa EwkRNHM47RwcjqlXGqWfmJU53E9Rv0xZkSzQc1xTrhMEhjpaIS472BtemhOC3o5raWjkDTggx oZFi6SsqFWxGtDbzQByLKBvbtFBuBL7pNboTz8Ok42OoJ6rWxZY4h+JBUaH8hrESPBstWSohZ C56KKFvKywNWi+XzYgWrhkzFjLpfo2sCyHQQyfZgTelKIf63/37Ko65TsUbesJUvkx2eN3YqB dbRdzGnT7XN/f/4ALNFQ3NOrhjckVTMnKa2JtL4fbKdyEc8fD+k+Qm+pZOtghNnqD3qRU+Lvh E/56kcltD3SjbtwugZ3sBmrxAU2ot0aUmH4VUFbWL84W3076LoENI14cAZf/K7GJOOrjOFr4w YKCJD2lTbS3G3p1w0XBOcwVNvvTiHqICwPTNVn2bTrdRFuNKvplSHeMl6OyN8LWmSqgFSk6dD uXU4MLAQl0vYXWYHxhTSUTkBrBwByFUt/wbjUS2cr+vI0Je7PbKX1qC1Q4w2VBVgb+Y7t0JA3 7k9UzH91JDbUQtktDIErhdqNMgj/P/dL/3DGx3YRedTPRTHzVbgrrIcqJfhCH6QkYEpDeRPKd UFAa6gFw47G5G/ocI1CchjuxxR7U68Lhz/lQlpVRFc0DKDvyXjaW+duDABGmv5ANH8nowBX64 +l4Y6WmP66FEv0XnQet1juaXPLtr7cGO/1j99pEylCm5Ei4RIf6Yk6G3pLq/ub3scHNayOAvN lvySeX77zfCwpocLoT9sXjvUW71c6rAAAkKeJ3EE0ST8X2YvnscRTW37KN36Wp List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jan 28, 2019 at 03:17:47PM +0100, Laurenz Albe wrote: > > Now, I would have thought that the "IF NOT EXISTS" part of > > the CREATE EXTENSION would have allowed the subsequent CREATE > > INDEX to succeed. > > > > I am wrong ? > > No, you are right. > > The "pg_trgm" extension does *not* exist in the database, and that is your problem. Wow, I didn't realize the difference between pg_extension and pg_available_extensions ... > Perhaps you preinstalled the extension in the wrong database (postgres?). It wasn't, indeed, *installed* (despite being available ;) Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B