Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw3hH-0005Qb-3l for pgsql-docs@arkaria.postgresql.org; Tue, 31 May 2022 15:22:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nw3hF-0006Ts-Ti for pgsql-docs@arkaria.postgresql.org; Tue, 31 May 2022 15:22:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw3hF-0006Tj-KB for pgsql-docs@lists.postgresql.org; Tue, 31 May 2022 15:22:13 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nw3hC-0001Ih-Fn for pgsql-docs@lists.postgresql.org; Tue, 31 May 2022 15:22:13 +0000 Received: by mail-lf1-x134.google.com with SMTP id y32so22044083lfa.6 for ; Tue, 31 May 2022 08:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=fNcTGveAi71b12XYX3NDVCF3Ak/Xqoh1G3zK9r4YSiY=; b=adObZELVdF5Oo1HXmLjWbcrNE/rhr9wCbm56L++10fS6F2psXDRtO2zarutr5lCQaY qloq+4DyhhBgPIo/kQcwALto2zcm/rdjmg93wDKauE8hSksp5PbpVRUpyN2Hl8qLJTcm gchJdAAKSikfoyE8FS1kbSPo1U07mSROCi4lGUboSz9enIYKjL/Bl3FmFJycsggVgbpv iqbjp00iAAjY5/w/J2bcZNBMvB+wLw+Nlgc58EswdXprwkoU/jZpU2kd6my3pKNP6Bao jB+DAs7Z5MyRolxO/m6GEiBOHugcxygQDc0Pw2ih7I27xMuj9fGOqRrM2GVoB90aOXoY ko1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=fNcTGveAi71b12XYX3NDVCF3Ak/Xqoh1G3zK9r4YSiY=; b=y2U+f4oQYqb38UxFmNeQm6hQzG0bFnKsMy98amV7ORwQcANqcXQ0hHdFXs9F1vD8fF Rwqzqdw9t6yL2vUcGzP7kAnd3MY6OMFK76fR+YDp8D48TKVLD0Q6jE7OmKvY4Xa2pkOL SEj8Chx/3dQ6IWOgmD3MjRCyOCQZesx73FHWE1jy2yPDXTQ0Qw3nRE5/NPrJ6SuyyWqq ZajGzT15aiv2DP8ypa4wAOuco1pO8vbe+2PeCDvnmNhsu3VZCfcSLXP81qXN+w+SpvkS OJ0sk9gvHYTuYdHyachLIuHBJzpT57ZN+DhTYiT0ruO0L600yPNIWWFw+3dmG+4N3C4X dqgQ== X-Gm-Message-State: AOAM5306GRTqROAKbKDy0iLGOR2R9oNFTGlG3hVpd6Hui7JmlzPaQuKd N8rN8KP7bDz0Nang7G4+dINHv69ZkZWiYYOG2ZJ5QmAQanAXjYhO X-Google-Smtp-Source: ABdhPJwXUELBMXNy7JwBhC/miy+iKZruflsDROBTmHWptzvRqrpwi1BkEzY9hdhr36dY1lR1UWFO0hHxpUtQAd3CHK0= X-Received: by 2002:a05:6512:39d6:b0:478:fd24:36 with SMTP id k22-20020a05651239d600b00478fd240036mr806026lfu.504.1654010527852; Tue, 31 May 2022 08:22:07 -0700 (PDT) MIME-Version: 1.0 References: <165400680669.573549.5553646427767597793@wrigleys.postgresql.org> In-Reply-To: <165400680669.573549.5553646427767597793@wrigleys.postgresql.org> From: jian he Date: Tue, 31 May 2022 20:51:55 +0530 Message-ID: Subject: Re: CREATE EXTENSION not adding extension on second SCHEMA To: gustavomilc@gmail.com, pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000f7ae5105e05055b1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f7ae5105e05055b1 Content-Type: text/plain; charset="UTF-8" quote from manual: > CREATE EXTENSION loads a new extension into the current database. There > must not be an extension of the same name already loaded. > You can try to alter[1] the extension to make it located to another schema. [1]: https://www.postgresql.org/docs/14/sql-alterextension.html On Tue, May 31, 2022 at 8:39 PM PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/14/sql-createextension.html > Description: > > I'm trying to add an extension to two schemas that I have in my DB. > > steps: > > 1) > > CREATE EXTENSION unaccent with SCHEMA public; > > response: OK. > > 2) > > CREATE EXTENSION unaccent with SCHEMA public_test; > > response: SQL Error [42710]: ERROR: extension "unaccent" already exists > > I tryed: > > SET search_path = public_test; > CREATE EXTENSION unaccent; > > and the response is: response: SQL Error [42710]: ERROR: extension > "unaccent" already exists > -- I recommend David Deutsch's <> Jian --000000000000f7ae5105e05055b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
quote from manual:
CREATE EXTENSION= loads a new extension into the current database. There must not be = an extension of the same name already loaded.
=C2=A0
You can try to alter[1] the extension to mak= e it located to another schema.



On Tue, May 31, 2022 at 8:39 PM PG Doc comments form <noreply@postgresql.org> wrote:
The following docu= mentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/= sql-createextension.html
Description:

I'm trying to add an extension to two schemas that I have in my DB.

steps:

1)

CREATE EXTENSION unaccent with SCHEMA public;

response: OK.

2)

CREATE EXTENSION unaccent with SCHEMA public_test;

response: SQL Error [42710]: ERROR: extension "unaccent" already = exists

I tryed:

SET search_path =3D public_test;
CREATE EXTENSION unaccent;

=C2=A0and the response is: response: SQL Error [42710]: ERROR: extension "unaccent" already exists


--
=C2=A0I recommend David Deutsch's <&= lt;The Beginning of Infinity>>

=C2=A0 Jian


=
--000000000000f7ae5105e05055b1--