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 1kPW1u-00008t-O1 for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 19:20: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 1kPW1t-0001iU-Mf for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 19:20: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 1kPW1s-0001iM-5J for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 19:20:13 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPW1o-0007Wd-JD for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 19:20:11 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D35361414; Mon, 5 Oct 2020 15:20:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 05 Oct 2020 15:20:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=D 7/h8533/Nw0euoeoRb7qJf+/Csrh8CZdoYSSPKK26s=; b=O20G+fm+L3s8KqLzC iiCsJUJNSecNbIL7nMMmI4YRw4kC0CKnPkqnW2p2wO/lU4KJ5yLaQ9cjX1cvp2oS ZyZP3KzH+UUG0pHICPlnfOlPFa8E4jnjZowvA0y0kocIEoHF/PoKgVKKL1HzXP6Y Siflq8qojGSXGaVbn8k11vZu9ItpEBpJLoItjXrYnCSMnPOmmOoKhmNT2mlbe2AK SLX7KNk46lwRrBAFMU8oRvLf0CPmVGctnyUQxByA4NvXAHperh88JFWd2wXDCLBW tkUoe1PKXp0o/gPjSuSUwjKi8jLy2RDy4rInJCZzd+DjQJ/TdBPqeYnYhdMGcKLM hMm0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=D7/h8533/Nw0euoeoRb7qJf+/Csrh8CZdoYSSPKK2 6s=; b=YEOwRcUVo6NHwRsbrbVVx0empW1PRS49GMJuKKoCK80X+If2CF0zg3Fx7 xN7mbm9kfiQRM74kz5mBKQs1bNxnAnwX2f5QooQejHHcprQAEaptVZDj4MOBaZJQ Q6KcFBU1vO3HFBDaz7WvYHYL25Ng18MZamDVEgHWnw59Na+rZX4yzZgN/zWkBTZo OkFunTUgRB84zLC94cGNNTl6Vbf66eBgneh695wJiLNNMm3+yvjjMCiwcD4yMwSY CqywNpJVirWTNNX2WiPdY5KY51Mjwv4nbmiFoVvc1ICv3IkWra2mFkj4QjGllxrU 78ew3TgsrnUOcmozhaHSnkyVEyGgw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgedvgddufeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecukfhppeejhedr udejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F8C13064674; Mon, 5 Oct 2020 15:20:03 -0400 (EDT) Subject: Re: UUID generation problem To: byrnejb@harte-lyne.ca Cc: Tom Lane , pgsql-general@lists.postgresql.org References: <271dfd309957472734a7aab8999659b1.squirrel@webmail.harte-lyne.ca> <86544317-8fa2-9193-6af2-6b6e5eab1cba@aklaver.com> <13a362eba18fbef24f8170a3e0cd8a9f.squirrel@webmail.harte-lyne.ca> <1721392.1601909600@sss.pgh.pa.us> <383e5b19-4fd5-bbf3-dd42-2e3d3c68206f@aklaver.com> <7b62b10e902e0831769f7ad5ffb37b25.squirrel@webmail.harte-lyne.ca> <70f1b155-42bf-9c66-27d2-a391842f335f@aklaver.com> <14597a6a35fe09a349fb56098ed4c5db.squirrel@webmail.harte-lyne.ca> From: Adrian Klaver Message-ID: <9653ebb5-98cc-b318-335d-babd7a62ce70@aklaver.com> Date: Mon, 5 Oct 2020 12:20:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <14597a6a35fe09a349fb56098ed4c5db.squirrel@webmail.harte-lyne.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/5/20 12:09 PM, James B. Byrne wrote: > > > On Mon, October 5, 2020 13:46, Adrian Klaver wrote: >> The thing is, from upstream: >> >> idempiere=# \df+ uuid_generate_v4 >> >> List >> of >> functions >> Schema | Name | Result data type | Argument data types | >> Type | >> Volatility | Parallel | Owner | Security | Access privileges | >> Language | >> Source code | Description >> --------+------------------+------------------+---------------------+------+------------+----------+----------+----------+-------------------+----------+------------------+------------- >> public | uuid_generate_v4 | uuid | | >> func | >> volatile | safe | postgres | invoker | | c | >> uuid_generate_v4 | >> (1 row) >> >> This indicates that you created the extension as user 'postgres'. >> > > Why would I not use the postgres user to create an extension? > The uuid-extension needs to be installed by a super user: test(5432)=> select current_user; current_user -------------- aklaver test(5432)=> create extension "uuid-ossp" ; ERROR: permission denied to create extension "uuid-ossp" HINT: Must be superuser to create this extension. test(5432)=> \c - postgres SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) You are now connected to database "test" as user "postgres". test(5432)=# create extension "uuid-ossp" ; CREATE EXTENSION So postgres is probably as good as any. I was just pointing out that what you posted earlier: 2000 2020-09-11 16:15:17: psql -d idempiere -U adempiere -c 'CREATE EXTENSION "uuid-ossp"' 2001 2020-09-11 16:17:08: su idempiere -c" psql -d idempiere -U adempiere -c 'CREATE EXTENSION "uuid-ossp" does not match what you showed for the actual installed code: idempiere=# \df+ uuid_generate_v4 List of functions Schema | Name | Result data type | Argument data types | Type | Volatility | Parallel | Owner | Security | Access privileges | Language | Source code | Description --------+------------------+------------------+---------------------+------+------------+----------+----------+----------+-------------------+----------+------------------+------------- public | uuid_generate_v4 | uuid | | func | volatile | safe | postgres | invoker | | c | uuid_generate_v4 | NOTE: Owner = postgres. -- Adrian Klaver adrian.klaver@aklaver.com