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 1hvjLz-0002LX-NV for pgsql-admin@arkaria.postgresql.org; Thu, 08 Aug 2019 14:25:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvjLx-0000M0-2e for pgsql-admin@arkaria.postgresql.org; Thu, 08 Aug 2019 14:25:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvjLw-0000Lt-PV for pgsql-admin@lists.postgresql.org; Thu, 08 Aug 2019 14:25:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvjLq-0003Jh-JU for pgsql-admin@lists.postgresql.org; Thu, 08 Aug 2019 14:25:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x78EP2BM019012; Thu, 8 Aug 2019 10:25:03 -0400 From: Tom Lane To: =?UTF-8?Q?Arni_Kromi=c4=87?= cc: pgsql-admin@lists.postgresql.org Subject: Re: Problem with schemas, possibly oids? In-reply-to: <3cabefc3-0713-7f5d-27c5-c0dab55cd8c6@Bios-ICT.hr> References: <3cabefc3-0713-7f5d-27c5-c0dab55cd8c6@Bios-ICT.hr> Comments: In-reply-to =?UTF-8?Q?Arni_Kromi=c4=87?= message dated "Thu, 08 Aug 2019 11:04:10 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19008.1565274302.1@sss.pgh.pa.us> Date: Thu, 08 Aug 2019 10:25:02 -0400 Message-ID: <19010.1565274302@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?Q?Arni_Kromi=c4=87?= writes: > We're using the clone_schema function from a postgres mailing list > (converted to a procedure now) to create new schemas from a template, > and so far we have created about 170 schemas that way. Now we have > encountered a problem which prevents us from creating new schemas: > CALL clone_schema('klijent_tpl', 'test-2019') > Although this has worked perfectly until now, the call results in this > error: >> ERROR: relation "test-2019.bc_mob_pr_pnd" does not exist > Moreover, trying to clone some of the existing schemas also fails: > call clone_schema ('HR16101766338-2018', 'test') >> NOTICE: source schema HR16101766338-2018 does not exist! > The source schema DOES exist. Given that both of these troublesome schemas have dashes in their names, the most obvious theory is that clone_schema() has some oversight about double-quoting schema names everywhere necessary. regards, tom lane