Repository navigation
Commit ae994ac
committed
Report the database locale on PostgreSQL 15, and skip what Windows cannot do
Three things, all turned up by CI.
get_ctypes.sql only existed from the 16_plus bucket down, so a PostgreSQL
15 server fell back to the default template and reported the server's own
lc_collate and lc_ctype settings rather than anything about the database,
which is exactly the bug this is meant to fix. datlocprovider and
daticulocale both arrived in 15, and 15 is also where a database first
stopped necessarily collating according to datcollate and datctype, so
the template moves down to the 15_plus bucket unchanged rather than being
duplicated.
The two libc scenarios deliberately set LC_COLLATE and LC_CTYPE to
different values, since that is what proves which of the two columns the
query reported. Windows builds accept the CREATE DATABASE but then refuse
to open the result, so those two scenarios now skip with the server's own
explanation when that is what comes back, and continue to fail on
anything else.
The builtin scenario no longer skips when template0 uses 'C' or 'POSIX'.
That guard belongs to the libc scenarios, which need a template locale
distinguishable from the defaults; the builtin scenario distinguishes
against the 'C.UTF-8' it creates the database with, and 'C' and 'POSIX'
are both perfectly distinguishable from that, so skipping them only lost
the scenario on the servers most likely to have a default template0.1 parent d025f95 commit ae994ac
2 files changed
Lines changed: 22 additions & 2 deletions
File tree
- web/pgadmin/browser/server_groups/servers/databases
- templates/databases/sql/15_plus
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
109 | 121 | | |
110 | 122 | | |
111 | 123 | | |
| |||
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
124 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
125 | 142 | | |
126 | 143 | | |
127 | 144 | | |
| |||
0 commit comments