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 1kPU9t-0004lO-KW for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 17:20:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPU9s-0003H3-Hu for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 17:20:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPU9r-0003Gw-4Y for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 17:20:20 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPU9o-0005vk-GO for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 17:20:18 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7080C5C0121; Mon, 5 Oct 2020 13:20:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 05 Oct 2020 13: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=P 3VfJDjUVAFw3GmWntaAtfLVeTZ3Hm1d5Nc9u587j5U=; b=ZDwj3tv2GUSOuniWo 2rM4/5+sVDR3onIc3FYj4fsOYt7ym3MfKbsOgPAGIlsIWG4w27+1o2ZDKub+qR6r s8VEUx63fS1Ln6cb3ypIudsgYz0h5Ix0q0uRJDkBao9tV0dXkiTjt0kwbO3GYMNZ NbKz+z4rz568iZEryfrEa3TA2nvRxtK0kWlXvj3WLu9/ivX3w+3NKBVzoyNIHhP9 SYNi+KFomhpYWX1Ws8L+p0xi7m0dP8dHGzSc0yf92NWvn9LJ32e0HcBmSxJ24ao3 T48wC/CnDq6i4aalPFLUmZg4ziiBEwYmTFC07KO8nUhBC9kXPTba1ksqW9bh0ZJs AtCKw== 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=P3VfJDjUVAFw3GmWntaAtfLVeTZ3Hm1d5Nc9u587j 5U=; b=Hnbz0+HnlSukZfCzykHOrtlvq1LZd2BINTkXJ7baUelh8NRhSoet13LeI ubBFPKFivgZGZnBVLWbymHCtdWd8dOfY7VWH7C+H6WALHM3AggvcrTlBjOrP3666 Uqaa/tvaKL8Jna+CPWfHLp6fiA94DYNaAuO34mRersvDG9/Y7bmZizXJtwkfrG0F CBvVhBPFfOPgPt4Lsa359zKnh1UWL6kCmXxliovqZ7iuFHDn3HtKxE9XyCKtWK7O B1EX0CMQCO0tHK3KaNSTWAgnkj/vO20XY9OQ/kCjJ9dIbwL76UPcPkZM0Eurveky /+Q6VRHOcyXKtutBmpEW9MsI8CXjA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgedvgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepveevfeevfe eugeffkeekhfegieeufffgteeujedvgffhueejjefhkeejleegtdegnecukfhppeejgedr leegrdejfedrvddvvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 5BB6D306468A; Mon, 5 Oct 2020 13:20:04 -0400 (EDT) Subject: Re: UUID generation problem To: =?UTF-8?Q?Paul_F=c3=b6rster?= , byrnejb@harte-lyne.ca Cc: 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> <91900e671c6f124811856337449555e1.squirrel@webmail.harte-lyne.ca> <5D2FCB5D-43F9-4FC6-87F8-6AA073B3FB1B@gmail.com> From: Adrian Klaver Message-ID: <4a62a2ea-1fca-3049-3929-3191f52924e2@aklaver.com> Date: Mon, 5 Oct 2020 10:20:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <5D2FCB5D-43F9-4FC6-87F8-6AA073B3FB1B@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/5/20 9:19 AM, Paul Förster wrote: > Hi James, > >> On 05. Oct, 2020, at 17:57, James B. Byrne wrote: >> >> [root@accounting-2 ~ (master)]# psql --dbname=idempiere >> --username=idempiere_dbadmin >> Password for user idempiere_dbadmin: >> psql (11.8) >> Type "help" for help. >> >> idempiere=# select current_schemas(true); >> current_schemas >> ------------------------ >> {adempiere,pg_catalog} >> (1 row) >> >> idempiere=# select uuid_generate_v4(); >> ERROR: function uuid_generate_v4() does not exist >> LINE 1: select uuid_generate_v4(); >> ^ >> HINT: No function matches the given name and argument types. You might need to >> add explicit type casts. >> idempiere=# select public.uuid_generate_v4(); >> uuid_generate_v4 >> -------------------------------------- >> 066e3298-3c91-4079-98ee-2b279bfc4025 >> (1 row) > > just out of curiosity, what does the search_path contain? It needs not necessarily reflect the contents of current_schemas, see the following example: > > postgres=# select current_schemas(true); > current_schemas > ------------------------------ > {pg_catalog,postgres,public} > (1 row) > > postgres=# select current_schemas(false); > current_schemas > ------------------- > {postgres,public} > (1 row) > > postgres=# show search_path; > search_path > ----------------- > "$user", public > (1 row) Actually it does: From the prompt I'm guessing you are logging in as 'postgres' user. In that case "$user" will become postgres and you will get: postgres=# select current_schemas(false); current_schemas ------------------- {postgres,public} The current_schemas(true) case will include implicit schemas that are 'always'(as I'm sure that someone will come up with the exception) there. > > Cheers, > Paul > -- Adrian Klaver adrian.klaver@aklaver.com