Re: UUID generation problem

From: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
To: "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: UUID generation problem
Date: 2020-10-05 16:46:43
Message-ID: cd28776344fe9148fb8756ce3b0b7d6d.squirrel@webmail.harte-lyne.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)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(at)accounting-2 ~ (master)]# cat .psqlrc
\set PROMPT1 '%/%R%# '

[root(at)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.

--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James B. Byrne 2020-10-05 16:48:19 Re: UUID generation problem
Previous Message James B. Byrne 2020-10-05 16:39:23 Re: UUID generation problem