Closed meteos77 closed 2 weeks ago
Pasting from documentation.
Create the xbook_db database via createdb xbook_db -E UTF8 or via the PostgreSQL-recommended procedure. Please note that xbook_db is only a suggestion.
Execute createlang plpgsql -d xbook_db or the PostgreSQL-recommended procedure for adding a new programming language to the xbook_db database. Please note that createlang may be deprecated.
If desired, replace all instances of the default administrator xbook_admin in postgresql_create_schema.sql file.
Log into your PostgreSQL xbook_db database and load the postgresql_create_schema.sql file via \i postgresql_create_schema.sql. While logged in, please load the unaccent extension via CREATE EXTENSION IF NOT EXISTS unaccent. You may remove the extension via the DROP EXTENSION command.
Please remember to set a new password for the xbook_admin account.
Pasting from documentation.
The pg_hba.conf and postgresql.conf files must be modified. The location of these files varies. Please restart the database service after modifying the files.
Example pg_hba.conf:
host xbook_db all 192.168.178.0/24 md5 hostssl xbook_db all 192.168.178.0/24 scram-sha-256
Example postgresql.conf:
listen_addresses = '192.168.178.1, localhost'
I have an instance of PQ@14 alive on a Mac Mini and able to connect to it via TLS. Not necessary, but easy to do if you read the PQ documentation and configuration files. Not documented because PQ is PQ and not BQ.
In the BQ configuration file, you need to specify the address of the machine which hosts PQ. The address can be an IP or a host name.
Of course, I followed your documentation, but I have the impression that you need to be a mechanic to drive the car.
I'd do a little doc for PQ beginners because you don't seem to see the problems you're encountering, even though they are blocking and preventing you from discovering BQ-PQ easily.
1.1a , I can't create the database with my user but with the ‘postgres’ user.
1.1.b -> with postgreSQL 16, createlang seems to be integrated by default.
1.1.c ... if desired => OK
1.1.d -> with the user ‘postgres’ I do not have access to the file ‘postgresql_create_schema.sql’ in the directory ‘biblioteq/SQL’. I ended up adding the user ‘postgres’ to my group.
1.1.e To change the xbook_admin password ALTER ROLE xbook_admin WITH PASSWORD ‘newpassword’;
-5 -> the pg_hda.conf and postgresql.conf files indicate : "# If you want to allow non-local connections, you need to add more records" => so if you only work locally, it doesn't seem necessary to modify these files?
You need to configure the /opt/biblioteq/biblioteq.conf file and replace hostname = mac-mini by hostname = localhost
Location: I connect to BiblioteQ on the PostgreSQL database with "xbook_admin" user but I don't have access to the ‘Grant privileges’ management in the key icon member manager ?
xbook_db=# select * from admin;
username | roles
-------------+---------------
xbook_admin | administrator
circulation | circulation
librarian | librarian
membership | membership
(4 rows)
See, all simple.
xbook_db=# select * from admin;
roles | username
---------------+-------------
administrator | xbook_admin
(1 row)
xbook_db=#
My button is enabled. The tool tip on said button says "Grant..." And the button is in Member's Browser. Has a key.
I'll create a local instance and see.
The documentation that I have followed so far to achieve this result
Installation_et_Configuration_de_PostgreSQL_BiblioteQ_Français.pdf
Created according to official simple document. Simple. Then connected as xbook_admin and I see Grant Privileges (PostgreSQL) as available.
Contributed documents are in a whatever category. I don't review them. If they instruct you to implode your computer, that's your fault.
This is my doc, so I find it clearer than your simple doc :-)
Also reviewed the logic. The button is available for administrator.
Send a picture.
And what about the rest? Good?
A picture of what? Importing works well I connect well with xbook_guest
"Location: I connect to BiblioteQ on the PostgreSQL database with "xbook_admin" user but I don't have access to the ‘Grant privileges’ management in the key icon member manager ?"
The button with the key icon is enabled. Did you click it?
The real difference with you is
xbook_db=# select * from admin; username | roles -------------+--------------- xbook_admin | administrator circulation | circulation librarian | librarian membership | membership (4 rows)
xbook_db=# select * from admin; roles | username ---------------+------------- administrator | xbook_admin (1 row)
The real difference with you is
xbook_db=# select * from admin; username | roles -------------+--------------- xbook_admin | administrator circulation | circulation librarian | librarian membership | membership (4 rows)
xbook_db=# select * from admin; roles | username ---------------+------------- administrator | xbook_admin (1 row)
I created the other administrator accounts to protect the data. They're not required. The members browser is for members, patrons. On the main window, there is a means for adding administrators on the left. There's a button there.
I find it natural to have different accounts for different purposes. So a circulation account for circulating, a membership account for members, etc. A super account is like root and root can be destructive.
I've just seen the icon to change password and create an admin. I had deactivated the “connection” bar with sqlite
I curios if there are other free software which have two databases. I see Ever and Koha and they are both Web-facing places so I imagine they have a single database engine.
With BQ, BQ is an interface. The data can be presented with other mediums. There was some person some years ago who made a Web interface. Is dead now. Not the person, well, maybe them too.
advancement with “connection bar” icons I've created a “circulation” user
xbook_db=# select * from admin;
roles | username
----------------------------------+-------------
administrator | xbook_admin
circulation librarian membership | circulation
(2 rows)
I don't know what screen to get with the key icon in the member manager?
Members. I added the key button for older accounts. 2008 maybe.
As I don't have an old account, that explains why I get nothing when I click on the button?
It doesn't produce a dialog.
Extract from the documentation: Grant Privileges Grant Privileges is available for PostgreSQL databases. If pressed, each listed account is removed from and added to the biblioteq_patron role.
I don't understand what this icon is for?
You described it by pasting its documented description.
From PostgreSQL documentation: “PostgreSQL manages database access permissions using the concept of roles. A role can be thought of as either a database user, or a group of database users, depending on how the role is set up. Roles can own database objects (for example, tables and functions) and can assign privileges on those objects to other roles to control who has access to which objects. Furthermore, it is possible to grant membership in a role to another role, thus allowing the member role to use privileges assigned to another role. The concept of roles subsumes the concepts of “users” and “groups”. In PostgreSQL versions before 8.1, users and groups were distinct kinds of entities, but now there are only roles. Any role can act as a user, a group, or both.”
Don't ask me, ask the PQ directly.
Thanks for the help and explanations.
If I get stuck, I'll think about looking at the key icon to see if it does anything.
I'm going to take it easy with BQ-PQ now that it's installed.
I'm just starting to configure PostgreSQL by following the guide. I'd need to run the command createlang plpgsql -d xbook_db ...
This seems obsolete to me, but what command should I use to replace it?
I've done the import with the command : \i postgresql_create_schema.sql
I connect to the database with the xbook_admin account and the xbook_admin password : $ psql xbook_db -U xbook_admin -> ok
Now I have a problem connecting from BQ it shows me in the log hostname mac-mini ...
I tried to add mac-mini to my hosts file, but BQ bogs down after the connection request...
What can I do? Thanks in advance for your help.