Re: [SOLVED] Re: UUID generation problem

2020-10-07 Thread Rob Sargent
On 10/7/20 3:28 PM, Adrian Klaver wrote: On 10/7/20 2:24 PM, Rob Sargent wrote: On 10/6/20 9:35 AM, James B. Byrne wrote: Thank you all for the help.  This is what ultimate resolved the issue for me: [root@accounting-2 ~ (master)]#  psql -E --dbname=idempiere --username=postgres --hos

Re: [SOLVED] Re: UUID generation problem

2020-10-07 Thread Adrian Klaver
On 10/7/20 2:24 PM, Rob Sargent wrote: On 10/6/20 9:35 AM, James B. Byrne wrote: Thank you all for the help.  This is what ultimate resolved the issue for me: [root@accounting-2 ~ (master)]#  psql -E --dbname=idempiere --username=postgres --host=localhost Password for user postgres: psql

Re: [SOLVED] Re: UUID generation problem

2020-10-07 Thread Rob Sargent
On 10/6/20 9:35 AM, James B. Byrne wrote: Thank you all for the help. This is what ultimate resolved the issue for me: [root@accounting-2 ~ (master)]# psql -E --dbname=idempiere --username=postgres --host=localhost Password for user postgres: psql (11.8) Type "help" for help. idempiere(54

[SOLVED] Re: UUID generation problem

2020-10-06 Thread James B. Byrne
Thank you all for the help. This is what ultimate resolved the issue for me: [root@accounting-2 ~ (master)]# psql -E --dbname=idempiere --username=postgres --host=localhost Password for user postgres: psql (11.8) Type "help" for help. idempiere(5432)=# select current_schemas(true); current

Re: UUID generation problem

2020-10-05 Thread David G. Johnston
On Monday, October 5, 2020, James B. Byrne wrote: > > idempiere(5432)=# alter role "idempiere_dbadmin" set search_path = > 'adempiere, > public'; > ALTER ROLE > idempiere(5432)=# select current_schemas(true); > current_schemas > - > {pg_catalog} > (1 row) > > This does not look

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
[root@accounting-2 ~ (master)]# psql -E --dbname=idempiere --username=idempiere_dbadmin --host=localhost Password for user idempiere_dbadmin: psql (11.8) Type "help" for help. idempiere(5432)=# select current_schemas(true); current_schemas - {pg_catalog} (1 row) idempiere(5432

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 15:35, David G. Johnston wrote: > On Monday, October 5, 2020, James B. Byrne wrote: > >> >> >> I am so confused by this. I tried to do this: >> >> [root@accounting-2 ~ (master)]# psql -E --dbname=idempiere >> --username=idempiere_dbadmin --host=localhost >> Password fo

Re: UUID generation problem

2020-10-05 Thread David G. Johnston
On Monday, October 5, 2020, James B. Byrne wrote: > > > I am so confused by this. I tried to do this: > > [root@accounting-2 ~ (master)]# psql -E --dbname=idempiere > --username=idempiere_dbadmin --host=localhost > Password for user idempiere_dbadmin: > psql (11.8) > Type "help" for help. > > i

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 12:03 PM, James B. Byrne wrote: On Mon, October 5, 2020 13:34, Paul Förster wrote: well, actually, you can just set the search_path for the role the application logs in with: alter role set search_path = ', pg_catalog, public'; The next time logs in, it should see the freshly

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 15:20, Adrian Klaver wrote: > > The uuid-extension needs to be installed by a super user: > . . . > > So postgres is probably as good as any. > > I was just pointing out that what you posted earlier: > > 2000 2020-09-11 16:15:17: psql -d idempiere -U adempiere -c 'CREATE

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 12:09 PM, James B. Byrne wrote: On Mon, October 5, 2020 13:46, Adrian Klaver wrote: The thing is, from upstream: idempiere=# \df+ uuid_generate_v4 List of functions Schema | Name | Result data type | Argument data types | Type | Volatility | Parallel |

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 13:46, Adrian Klaver wrote: > The thing is, from upstream: > > idempiere=# \df+ uuid_generate_v4 > > List > of > functions > Schema | Name | Result data type | Argument data types | > Type | > Volatility | Parallel | Owner | Security | Access

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 13:34, Paul Förster wrote: > > well, actually, you can just set the search_path for the role the application > logs in with: > > alter role set search_path = ', pg_catalog, public'; > > The next time logs in, it should see the freshly set search_path. > > When we creat

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 13:31, Adrian Klaver wrote: > > That is because I sent the wrong prompt:( It should have been: > > \set PROMPT1 '%/(%>)%R%# ' > idempiere=# \set PROMPT1 '%/(%>)%R%# ' idempiere(5432)=# That works. -- *** e-Mail is NOT a SECURE channel *** Do N

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 13:24, Adrian Klaver wrote: > > To confirm what role this is assigned to do: > > select rolname from pg_authid where oid = 21328; > idempiere=# select rolname from pg_authid where oid = 21328; rolname --- idempiere_dbadmin (1 row) -- *** e

Re: UUID generation problem

2020-10-05 Thread Tom Lane
"James B. Byrne" writes: >> 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. > It seems so: > idempiere=# SELECT * FROM pg_db_role_setting; > setdatabase | setrole | setconfig

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 9:31 AM, James B. Byrne wrote: On Mon, October 5, 2020 11:52, Adrian Klaver wrote: 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.

Re: UUID generation problem

2020-10-05 Thread Paul Förster
Hi James, > On 05. Oct, 2020, at 19:16, James B. Byrne wrote: > > As this is an application package it is not within my purview to alter the > code. To do so would rik a return of the problem with every update. > > Adding public to the search path is fine by me. However, I still need to find

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
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 --user

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 9:59 AM, James B. Byrne wrote: On Mon, October 5, 2020 12:51, Tom Lane wrote: "James B. Byrne" writes: [root@accounting-2 ~ (master)]# psql --dbname=idempiere --username=idempiere_dbadmin --host=localhost Password for user idempiere_dbadmin: psql (11.8) Type "help" for help. i

Re: UUID generation problem

2020-10-05 Thread Paul Förster
Hi Adrian, > On 05. Oct, 2020, at 19:20, Adrian Klaver wrote: > 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 > ---

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
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(t

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 13:07, Paul Förster wrote: > > I guess that's why you don't see the uuid_generate_v4() function. I suggest > you > either fully qualify it, i.e. public.uuid_generate_v4() or add public to your > search path. As this is an application package it is not within my purview

Re: UUID generation problem

2020-10-05 Thread Paul Förster
Hi James, > 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

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 12:51, Tom Lane wrote: > "James B. Byrne" writes: >> [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=# select current_

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 12:19, Paul Förster wrote: > > 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 >

Re: UUID generation problem

2020-10-05 Thread Tom Lane
"James B. Byrne" writes: > [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=# select current_schemas(true); > current_schemas >

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 12:12, Adrian Klaver wrote: > > Also I would do at system command line: > > ps ax | grep post > > to see how many instances of Postgres you have running. > [root@accounting-2 ~ (master)]# ps ax | grep post 20028 - IsJ 0:00.04 postgres: idempiere_dbadmin idempiere 127

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
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_d

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 12:06, Tom Lane wrote: > "James B. Byrne" writes: >> On Mon, October 5, 2020 10:53, Tom Lane wrote: >>> 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 m

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 11:52, Adrian Klaver wrote: > 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. > That is the meaning that I meant to

Re: UUID generation problem

2020-10-05 Thread Paul Förster
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_schema

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
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_sch

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
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_sch

Re: UUID generation problem

2020-10-05 Thread Tom Lane
"James B. Byrne" writes: > On Mon, October 5, 2020 10:53, Tom Lane wrote: >> 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 > a

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
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

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
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 yoursel

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
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

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 7:22 AM, James B. Byrne wrote: On Mon, October 5, 2020 10:18, Adrian Klaver wrote: So as same user: select uuid_generate_v4(); select public.uuid_generate_v4(); \dn+ public [root@accounting-2 ~ (master)]# sudo -u postgres psql --dbname=idempiere --username=idempiere_dbadmin Pa

Re: UUID generation problem

2020-10-05 Thread Tom Lane
"James B. Byrne" writes: > 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

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Mon, October 5, 2020 10:18, Adrian Klaver wrote: > So as same user: > > select uuid_generate_v4(); > > select public.uuid_generate_v4(); > > \dn+ public > [root@accounting-2 ~ (master)]# sudo -u postgres psql --dbname=idempiere --username=idempiere_dbadmin Password for user idempiere_dbadmin

Re: UUID generation problem

2020-10-05 Thread Adrian Klaver
On 10/5/20 6:18 AM, James B. Byrne wrote: On Sat, October 3, 2020 00:28, Adrian Klaver wrote: I'm not sure that is going to help. You are not, AFAICT, getting any permission denied messages. What does: \df+ uuid_generate_v4 show under Access privileges? What does: select current_schemas(

Re: UUID generation problem

2020-10-05 Thread James B. Byrne
On Sat, October 3, 2020 00:28, Adrian Klaver wrote: > > I'm not sure that is going to help. You are not, AFAICT, getting any > permission denied messages. > > What does: > > \df+ uuid_generate_v4 > > show under Access privileges? > > What does: > > select current_schemas(true); > > show? > > id

Re: UUID generation problem

2020-10-03 Thread Paul Förster
Hi James, > On 03. Oct, 2020, at 04:17, James B. Byrne wrote: > > On Fri, October 2, 2020 21:13, Tom Lane wrote: >> "James B. Byrne" writes: >>> On Fri, October 2, 2020 18:46, Tom Lane wrote: >> >>> idempiere=# \dn >>>List of schemas >>> Name| Owner >>> ---+--- >>>

Re: UUID generation problem

2020-10-02 Thread Adrian Klaver
On 10/2/20 7:17 PM, James B. Byrne wrote: On Fri, October 2, 2020 21:13, Tom Lane wrote: "James B. Byrne" writes: On Fri, October 2, 2020 18:46, Tom Lane wrote: The two likely possibilities are that Idempiere isn't connecting to the same database as you are doing manually, or that it is usi

Re: UUID generation problem

2020-10-02 Thread James B. Byrne
On Fri, October 2, 2020 21:13, Tom Lane wrote: > "James B. Byrne" writes: >> On Fri, October 2, 2020 18:46, Tom Lane wrote: >>> The two likely possibilities are that Idempiere isn't connecting to the >>> same database as you are doing manually, or that it is using a search_path >>> setting that

Re: UUID generation problem

2020-10-02 Thread Tom Lane
"James B. Byrne" writes: > On Fri, October 2, 2020 18:46, Tom Lane wrote: >> The two likely possibilities are that Idempiere isn't connecting to the >> same database as you are doing manually, or that it is using a search_path >> setting that doesn't include the "public" schema. >> I think you cou

Re: UUID generation problem

2020-10-02 Thread Adrian Klaver
On 10/2/20 5:08 PM, James B. Byrne wrote: On Fri, October 2, 2020 18:14, Adrian Klaver wrote: Per comment over at SO, have you run uuid_generate_v4()/generate_uuid(). in psql to see if it is there and works? [root@accounting-2 ~ (master)]# sudo -u postgres psql --dbname=idempiere --userna

Re: UUID generation problem

2020-10-02 Thread James B. Byrne
On Fri, October 2, 2020 18:46, Tom Lane wrote: > "James B. Byrne" writes: >> I have a FreeBSD-12.1p10 system running postgreSQL-11.8. This is a test >> platform for Idempiere. When creating a new client in Idempiere I get this >> error message: > >> ** org.postgresql.util.PSQLException: ERROR:

Re: UUID generation problem

2020-10-02 Thread James B. Byrne
On Fri, October 2, 2020 18:14, Adrian Klaver wrote: > > Per comment over at SO, have you run uuid_generate_v4()/generate_uuid(). > in psql to see if it is there and works? > [root@accounting-2 ~ (master)]# sudo -u postgres psql --dbname=idempiere --username=idempiere_dbadmin Password for user

Re: UUID generation problem

2020-10-02 Thread Tom Lane
"James B. Byrne" writes: > I have a FreeBSD-12.1p10 system running postgreSQL-11.8. This is a test > platform for Idempiere. When creating a new client in Idempiere I get this > error message: > ** org.postgresql.util.PSQLException: ERROR: function uuid_generate_v4() does > not exist Hint: No fu

Re: UUID generation problem

2020-10-02 Thread Adrian Klaver
On 10/2/20 3:08 PM, James B. Byrne wrote: I have a FreeBSD-12.1p10 system running postgreSQL-11.8. This is a test platform for Idempiere. When creating a new client in Idempiere I get this error message: ** org.postgresql.util.PSQLException: ERROR: function uuid_generate_v4() does not exist Hin