Re: UUID generation problem

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: byrnejb(at)harte-lyne(dot)ca, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: UUID generation problem
Date: 2020-10-05 15:52:04
Message-ID: 383e5b19-4fd5-bbf3-dd42-2e3d3c68206f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/5/20 8:43 AM, James B. Byrne wrote:
>
>
> On Mon, October 5, 2020 10:53, Tom Lane wrote:
>
>> That seems to show quite definitively that public is not in your
>> search_path, which contradicts the current_schemas() result you
>> gave earlier. I continue to suspect that you are somehow
>> confusing yourself by testing in different databases and/or
>> with different user accounts.
>
> Possibly. I do not make any definitive claims at this point. However, the
> application properties of the DB connection are:
>
> Connection=xyzCConnection[name\=accounting.harte-lyne.ca
> {localhost-idempiere-idempiere_dbadmin},
> AppsHost\=accounting.harte-lyne.ca,
> WebPort\=8080,
> SSLPort\=8443,
> type\=PostgreSQL,
> DBhost\=localhost,
> DBport\=5432,
> DBname\=idempiere,
> BQ\=false,
> FW\=false,
> FWhost\=,
> FWport\=0,
> UID\=idempiere_dbadmin,
> PWD\=xxxxxxxxxxxxxxxx]
>
> This indicates that the DB name is idempiere and that the DB connection user
> name is idempiere_dbadmin.
>
> psql shows this:
>
> [root(at)accounting-2 ~ (master)]# psql --dbname=idempiere
> --username=idempiere_dbadmin
> Password for user idempiere_dbadmin:
> psql (11.8)
> Type "help" for help.
>
> idempiere=# \l
> List of databases
> Name | Owner | Encoding | Collate | Ctype |
> Access privileges
> ---------------------+-------------------+----------+---------+-------+-----------------------
> idempiere | idempiere_dbadmin | UTF8 | C | C |
> lsmb_access_test_db | postgres | UTF8 | C | C |
> postgres | postgres | UTF8 | C | C |
> template0 | postgres | UTF8 | C | C |
> =c/postgres +
> | | | | |
> postgres=CTc/postgres
> template1 | postgres | UTF8 | C | C |
> =c/postgres +
> | | | | |
> postgres=CTc/postgres
> testcompany | lsmb_dbadmin | UTF8 | C | C |
> (6 rows)
>
> The username idempiere_dbadmin does not exist in /etc/passwd.

It would not unless it was an OS/system user also. It is just a Postgres
database user name(role).

>
> idempiere=# \dx
> List of installed extensions
> Name | Version | Schema | Description
> -----------+---------+------------+-------------------------------------------------
> plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
> uuid-ossp | 1.1 | public | generate universally unique identifiers
> (UUIDs)

Your previous posts show uuid-ossp and its functions installed
somewhere. The issue is that the functions are not being found unless
they are schema qualified and that has to do with search_path.

>
> The idempiere database was created before I added the uuid-ossp extension. That
> possibly bears on this matter.

That is the natural order of events. The database has to exist before
you can add an extension to it. Unless you are saying that you did not
build the extension until after the database was created.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James B. Byrne 2020-10-05 15:57:45 Re: UUID generation problem
Previous Message James B. Byrne 2020-10-05 15:43:21 Re: UUID generation problem