From: Adrian Klaver <adrian.klaver@aklaver.com>
To: byrnejb@harte-lyne.ca
Cc: pgsql-general@lists.postgresql.org
Subject: Re: UUID generation problem
Date: Mon, 5 Oct 2020 10:31:36 -0700
Message-ID: <bdcb7b04-0200-1975-dcdc-26f98509df22@aklaver.com> (raw)
In-Reply-To: <cd28776344fe9148fb8756ce3b0b7d6d.squirrel@webmail.harte-lyne.ca>
References: <271dfd309957472734a7aab8999659b1.squirrel@webmail.harte-lyne.ca>
<86544317-8fa2-9193-6af2-6b6e5eab1cba@aklaver.com>
<d4d8c3b2def5f1cb33bffe21a7085811.squirrel@webmail.harte-lyne.ca>
<dfc4a83f-c227-684c-c841-e2fa7069bd4b@aklaver.com>
<13a362eba18fbef24f8170a3e0cd8a9f.squirrel@webmail.harte-lyne.ca>
<cf5938f7-5dc7-b9c4-16b5-b790737a31a2@aklaver.com>
<91900e671c6f124811856337449555e1.squirrel@webmail.harte-lyne.ca>
<8bbfffec-a084-88bf-b4dc-bbfadfd21df6@aklaver.com>
<cd28776344fe9148fb8756ce3b0b7d6d.squirrel@webmail.harte-lyne.ca>
On 10/5/20 9:46 AM, James B. Byrne wrote:
>
>
> On Mon, October 5, 2020 12:08, Adrian Klaver wrote:
>> On 10/5/20 8:57 AM, James B. Byrne wrote:
>>>
>>>
>>> On Mon, October 5, 2020 11:15, Adrian Klaver wrote:
>>>>
>>>> Per Tom's post this does not make sense.
>>>>
>>>> What if you connect doing?:
>>>>
>>>> psql --dbname=idempiere --username=idempiere_dbadmin
>>>>
>>>> And specify the port(-p)
>>>>
>>>> Cut out the sudo.
>>>>
>>>>
>>>> Then do:
>>>>
>>>> select current_schemas(true);
>>>>
>>>> select uuid_generate_v4();
>>>>
>>>> select public.uuid_generate_v4();
>>>>
>>>
>>> [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}
>>
>> Well there is your problem. That is a different search_path and it does
>> not include the 'public' schema. This would indicate you are connecting
>> to a different instance of Postgres then in your previous example. I'm
>> going to bet you are connecting to different ports. I use the following
>> in my .psqlrc(local psql conf file):
>>
>> \set PROMPT1 '%/%R%# '
>>
>> to get the database name and port. I would try that at least
>> temporarily(at psql prompt) to sort out what/where you are connecting to.
>>
>
> [root@accounting-2 ~ (master)]# cat .psqlrc
> \set PROMPT1 '%/%R%# '
>
> [root@accounting-2 ~ (master)]# psql --dbname=idempiere
> --username=idempiere_dbadmin --host=localhost
> Password for user idempiere_dbadmin:
> psql (11.8)
> Type "help" for help.
>
> idempiere=# \set
> . . .
> PROMPT1 = '%/%R%# '
> PROMPT2 = '%/%R%# '
> PROMPT3 = '>> '
> . . .
> VERSION_NAME = '11.8'
> VERSION_NUM = '110008'
> idempiere=#
> idempiere=#
> idempiere=#
>
> The setting does not appear to alter the actual prompt.
That is because I sent the wrong prompt:( It should have been:
\set PROMPT1 '%/(%>)%R%# '
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, byrnejb@harte-lyne.ca
Subject: Re: UUID generation problem
In-Reply-To: <bdcb7b04-0200-1975-dcdc-26f98509df22@aklaver.com>
References: <271dfd309957472734a7aab8999659b1.squirrel@webmail.harte-lyne.ca> <86544317-8fa2-9193-6af2-6b6e5eab1cba@aklaver.com> <d4d8c3b2def5f1cb33bffe21a7085811.squirrel@webmail.harte-lyne.ca> <dfc4a83f-c227-684c-c841-e2fa7069bd4b@aklaver.com> <13a362eba18fbef24f8170a3e0cd8a9f.squirrel@webmail.harte-lyne.ca> <cf5938f7-5dc7-b9c4-16b5-b790737a31a2@aklaver.com> <91900e671c6f124811856337449555e1.squirrel@webmail.harte-lyne.ca> <8bbfffec-a084-88bf-b4dc-bbfadfd21df6@aklaver.com> <cd28776344fe9148fb8756ce3b0b7d6d.squirrel@webmail.harte-lyne.ca> <bdcb7b04-0200-1975-dcdc-26f98509df22@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox