Site Tools


boamp

https://github.com/michelbl/scraper-boamp

cp config.ini.example config.ini
vi config.ini

su - postgres
   
postgres@db2:~$ psql
psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1))
Type "help" for help.

postgres=# create database boamp
postgres=# \q

postgres@db2:~$ psql -d boamp
psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1))
Type "help" for help.

# create table boamp (year int, doc_type text, ident text, xml_content text);
CREATE TABLE
boamp=# create index on boamp (ident);
CREATE INDEX
boamp=# create table boamp_source_archives (url text);
CREATE TABLE
boamp=# create index on boamp_source_archives (url);
CREATE INDEX

boamp=#create user psqldbuser ;
CREATE ROLE

boamp=# \password psqldbuser
Enter new password:
Enter it again:

boamp=#alter role psqldbuser with Superuser ;
ALTER ROLE
boamp=# \du
                                    List of roles
 Role name  |                         Attributes                         | Member of
------------+------------------------------------------------------------+-----------
 postgres   | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
 psqldbuser | Superuser                                                  | {}

boamp=# \d
                 List of relations
 Schema |         Name          | Type  |  Owner
--------+-----------------------+-------+----------
 public | boamp                 | table | postgres
 public | boamp_source_archives | table | postgres
(2 rows)

boamp=# grant all privileges on boamp to psqldbuser ;
GRANT
boamp=# grant all privileges on boamp_source_archives to psqldbuser ;
GRANT
boamp=# \dp+
                                          Access privileges
 Schema |         Name          | Type  |      Access privileges      | Column privileges | Policies
--------+-----------------------+-------+-----------------------------+-------------------+----------
 public | boamp                 | table | postgres=arwdDxt/postgres  +|                   |
        |                       |       | psqldbuser=arwdDxt/postgres |                   |
 public | boamp_source_archives | table | postgres=arwdDxt/postgres  +|                   |
        |                       |       | psqldbuser=arwdDxt/postgres |                   |
(2 rows)

boamp=#
  
boamp.txt · Last modified: 2019/03/21 16:03 (external edit)