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 1kPTi5-0003qs-Qf for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 16:51:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPTi4-0005EC-LK for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 16:51:36 +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 1kPTi4-0005E4-D0 for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 16:51:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPTi2-0006Hb-18 for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 16:51:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 095GpSvR1778496; Mon, 5 Oct 2020 12:51:28 -0400 From: Tom Lane To: byrnejb@harte-lyne.ca cc: "Adrian Klaver" , pgsql-general@lists.postgresql.org Subject: Re: UUID generation problem In-reply-to: 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> <1732745.1601914016@sss.pgh.pa.us> Comments: In-reply-to "James B. Byrne" message dated "Mon, 05 Oct 2020 12:39:23 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1778494.1601916688.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 05 Oct 2020 12:51:28 -0400 Message-ID: <1778495.1601916688@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "James B. Byrne" writes: > [root@accounting-2 ~ (master)]# psql --dbname=3Didempiere > --username=3Didempiere_dbadmin --host=3Dlocalhost > Password for user idempiere_dbadmin: > psql (11.8) > Type "help" for help. > idempiere=3D# select current_schemas(true); > current_schemas > ------------------------ > {adempiere,pg_catalog} > (1 row) > idempiere=3D# 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=3D# select public.uuid_generate_v4(); > uuid_generate_v4 > -------------------------------------- > 5ba19b69-ec8e-4d8e-8968-7c84eccc4351 > (1 row) Well, at least here we have consistent results: "public" is not in your search_path. (Presumably, "show search_path" would confirm that.) The question is what did you do differently before that led to the other current_schemas result? If the *only* difference is whether you use --host=3Dlocalhost or not, it's hard to conclude anything but that you're connecting to two different databases. I don't quite see how that could be, with only one postmaster on the machine, but maybe it's time to wonder about rogue connection poolers or the like. It might be worth poking into the pg_db_role_setting catalog, which is the most likely source of a different search_path for different connections. Another line of thought is maybe you have a ~/.psqlrc that's altering the search_path setting. regards, tom lane