Commit 72f4f9b
committed
BREAKING CHANGE: don't set connection env vars
The 'setup-postgres' action used to set libpq environment variables [1]
with connection parameters so the PostgreSQL client applications [2],
such as 'psql' or 'createuser', won't require any configuration before
using.
Unfortunately these libpq environment variables are also used by all
libpq clients including database drivers such as 'psycopg'. While this
may sound good, it may as well lead to undesired behaviour and unobvious
issues when connection parameters are automatically pulled from
environment but most not.
Nevertheless, the need to easy usage of the client applications [2] is
indisputable because providing a bunch of connection parameters all the
time is tedious. Therefore this patch pushes requires connection
parameters to the connection service file [3], so the client
applications can pull the data on-demand. E.g:
$ psql service=superuser -c "SELECT 1;"
$ PGSERVICE=superuser createuser myuser
[1] https://www.postgresql.org/docs/15/libpq-envars.html
[2] https://www.postgresql.org/docs/15/reference-client.html
[3] https://www.postgresql.org/docs/15/libpq-pgservice.html1 parent 3574bd5 commit 72f4f9b
File tree
4 files changed
+109
-26
lines changed- .github/workflows
4 files changed
+109
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
62 | 65 | | |
| 66 | + | |
63 | 67 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
59 | 94 | | |
60 | 95 | | |
61 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | | - | |
75 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | | - | |
78 | | - | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | | - | |
81 | | - | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
| |||
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| 109 | + | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | | - | |
| 113 | + | |
103 | 114 | | |
104 | | - | |
105 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
106 | 119 | | |
107 | | - | |
| 120 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
34 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
35 | 50 | | |
36 | 51 | | |
37 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
38 | 57 | | |
39 | 58 | | |
40 | | - | |
| 59 | + | |
41 | 60 | | |
42 | 61 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
46 | 69 | | |
47 | 70 | | |
48 | 71 | | |
| |||
146 | 169 | | |
147 | 170 | | |
148 | 171 | | |
149 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
150 | 177 | | |
151 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
152 | 183 | | |
153 | 184 | | |
154 | 185 | | |
155 | 186 | | |
156 | 187 | | |
157 | 188 | | |
158 | | - | |
| 189 | + | |
159 | 190 | | |
160 | 191 | | |
161 | 192 | | |
| |||
0 commit comments