File tree 3 files changed +57
-0
lines changed
3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ .git
2
+ Dockerfile *
Original file line number Diff line number Diff line change
1
+ FROM postgres:12
2
+
3
+ ENV PG_MAJOR 12
4
+
5
+ LABEL maintainer="PgDD Project - https://github.com/rustprooflabs/pgdd"
6
+
7
+ RUN apt-get update \
8
+ && apt-cache showpkg postgresql-$PG_MAJOR \
9
+ && apt-get install -y --no-install-recommends \
10
+ make \
11
+ postgresql-server-dev-$PG_MAJOR \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ WORKDIR /tmp/pgdd
15
+ COPY *.sql ./
16
+ COPY pgdd.control ./
17
+ COPY Makefile ./
18
+
19
+ RUN make install
20
+
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ The PostgreSQL Data Dictionary (`pgdd`) is an in-database solution to provide
4
4
introspection via standard SQL query syntax. This extension makes it easy to
5
5
provide a usable data dictionary to all users of a PostgreSQL database.
6
6
7
+ ## Compatability
8
+
9
+ PgDD has been tested and found to work against PostgreSQL 10
10
+ through 13-beta2.
11
+
12
+ Docker images available on
13
+ [ Docker Hub] ( https://hub.docker.com/r/rustprooflabs/pgdd ) .
14
+
7
15
8
16
## Install ` pgdd `
9
17
@@ -42,6 +50,32 @@ psql -d your_db
42
50
CREATE EXTENSION pgdd;
43
51
```
44
52
53
+ ## Docker Image
54
+
55
+ Build Docker image. Uses [ main Postgres image] ( https://hub.docker.com/_/postgres/ ) as starting point, see that
56
+ repo for full instructions on using the core Postgres functionality.
57
+
58
+ ```
59
+ docker build -t rustprooflabs/pgdd .
60
+ ```
61
+
62
+ Build with tag.
63
+
64
+ Run Postgres in Docker.
65
+
66
+ ```
67
+ docker run --name test-pgdd12 -e POSTGRES_PASSWORD=mysecretpassword -p 6512:5432 -d rustprooflabs/pgdd
68
+ ```
69
+
70
+ Connect via ` psql ` using ` postgres ` role, provide password from prior step
71
+ when prompted.
72
+
73
+ ```
74
+ psql -h host_or_ip -p 6512 -U postgres
75
+ ```
76
+
77
+
78
+
45
79
## Database Permissions
46
80
47
81
Create Read-only group role to assign to users
@@ -82,6 +116,7 @@ GRANT dd_readwrite TO <your_login_user>;
82
116
```
83
117
84
118
119
+
85
120
## Use Data Dictionary
86
121
87
122
Connect to your database using your favorite SQL client. This
You can’t perform that action at this time.
0 commit comments