Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e6785a5

Browse files
committed
Fix wording in amvalidate error messages
Remove some gratuituous message differences by making the AM name previously embedded in each message be a %s instead. While at it, get rid of terminology that's unclear and unnecessary in one message. Discussion: https://postgr.es/m/20170523001557.bq2hbq7hxyvyw62q@alvherre.pgsql
1 parent 185364b commit e6785a5

File tree

7 files changed

+122
-122
lines changed

7 files changed

+122
-122
lines changed

contrib/isn/expected/isn.out

+16-16
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ FROM (SELECT amname, opcname, opc.oid
1010
WHERE opc.oid >= 16384
1111
ORDER BY 1, 2 OFFSET 0) ss
1212
WHERE NOT amvalidate(oid);
13-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
14-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
15-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
16-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
17-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
18-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
19-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
20-
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
21-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
22-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
23-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
24-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
25-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
26-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
27-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
28-
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
13+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
14+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
15+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
16+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
17+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
18+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
19+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
20+
INFO: operator family "isn_ops" of access method btree is missing cross-type operator(s)
21+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
22+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
23+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
24+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
25+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
26+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
27+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
28+
INFO: operator family "isn_ops" of access method hash is missing cross-type operator(s)
2929
amname | opcname
3030
--------+------------
3131
btree | ean13_ops

src/backend/access/brin/brin_validate.c

+18-18
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ brinvalidate(Oid opclassoid)
113113
{
114114
ereport(INFO,
115115
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
116-
errmsg("brin operator family \"%s\" contains function %s with invalid support number %d",
117-
opfamilyname,
116+
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
117+
opfamilyname, "brin",
118118
format_procedure(procform->amproc),
119119
procform->amprocnum)));
120120
result = false;
@@ -129,8 +129,8 @@ brinvalidate(Oid opclassoid)
129129
{
130130
ereport(INFO,
131131
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
132-
errmsg("brin operator family \"%s\" contains function %s with wrong signature for support number %d",
133-
opfamilyname,
132+
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
133+
opfamilyname, "brin",
134134
format_procedure(procform->amproc),
135135
procform->amprocnum)));
136136
result = false;
@@ -151,8 +151,8 @@ brinvalidate(Oid opclassoid)
151151
{
152152
ereport(INFO,
153153
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
154-
errmsg("brin operator family \"%s\" contains operator %s with invalid strategy number %d",
155-
opfamilyname,
154+
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
155+
opfamilyname, "brin",
156156
format_operator(oprform->amopopr),
157157
oprform->amopstrategy)));
158158
result = false;
@@ -180,8 +180,8 @@ brinvalidate(Oid opclassoid)
180180
{
181181
ereport(INFO,
182182
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
183-
errmsg("brin operator family \"%s\" contains invalid ORDER BY specification for operator %s",
184-
opfamilyname,
183+
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
184+
opfamilyname, "brin",
185185
format_operator(oprform->amopopr))));
186186
result = false;
187187
}
@@ -193,8 +193,8 @@ brinvalidate(Oid opclassoid)
193193
{
194194
ereport(INFO,
195195
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
196-
errmsg("brin operator family \"%s\" contains operator %s with wrong signature",
197-
opfamilyname,
196+
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
197+
opfamilyname, "brin",
198198
format_operator(oprform->amopopr))));
199199
result = false;
200200
}
@@ -231,8 +231,8 @@ brinvalidate(Oid opclassoid)
231231
{
232232
ereport(INFO,
233233
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
234-
errmsg("brin operator family \"%s\" is missing operator(s) for types %s and %s",
235-
opfamilyname,
234+
errmsg("operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
235+
opfamilyname, "brin",
236236
format_type_be(thisgroup->lefttype),
237237
format_type_be(thisgroup->righttype))));
238238
result = false;
@@ -241,8 +241,8 @@ brinvalidate(Oid opclassoid)
241241
{
242242
ereport(INFO,
243243
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
244-
errmsg("brin operator family \"%s\" is missing support function(s) for types %s and %s",
245-
opfamilyname,
244+
errmsg("operator family \"%s\" of access method %s is missing support function(s) for types %s and %s",
245+
opfamilyname, "brin",
246246
format_type_be(thisgroup->lefttype),
247247
format_type_be(thisgroup->righttype))));
248248
result = false;
@@ -254,8 +254,8 @@ brinvalidate(Oid opclassoid)
254254
{
255255
ereport(INFO,
256256
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
257-
errmsg("brin operator class \"%s\" is missing operator(s)",
258-
opclassname)));
257+
errmsg("operator class \"%s\" of access method %s is missing operator(s)",
258+
opclassname, "brin")));
259259
result = false;
260260
}
261261
for (i = 1; i <= BRIN_MANDATORY_NPROCS; i++)
@@ -265,8 +265,8 @@ brinvalidate(Oid opclassoid)
265265
continue; /* got it */
266266
ereport(INFO,
267267
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
268-
errmsg("brin operator class \"%s\" is missing support function %d",
269-
opclassname, i)));
268+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
269+
opclassname, "brin", i)));
270270
result = false;
271271
}
272272

src/backend/access/gin/ginvalidate.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ ginvalidate(Oid opclassoid)
9090
{
9191
ereport(INFO,
9292
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
93-
errmsg("gin operator family \"%s\" contains support procedure %s with cross-type registration",
94-
opfamilyname,
93+
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
94+
opfamilyname, "gin",
9595
format_procedure(procform->amproc))));
9696
result = false;
9797
}
@@ -146,8 +146,8 @@ ginvalidate(Oid opclassoid)
146146
default:
147147
ereport(INFO,
148148
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
149-
errmsg("gin operator family \"%s\" contains function %s with invalid support number %d",
150-
opfamilyname,
149+
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
150+
opfamilyname, "gin",
151151
format_procedure(procform->amproc),
152152
procform->amprocnum)));
153153
result = false;
@@ -158,8 +158,8 @@ ginvalidate(Oid opclassoid)
158158
{
159159
ereport(INFO,
160160
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
161-
errmsg("gin operator family \"%s\" contains function %s with wrong signature for support number %d",
162-
opfamilyname,
161+
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
162+
opfamilyname, "gin",
163163
format_procedure(procform->amproc),
164164
procform->amprocnum)));
165165
result = false;
@@ -177,8 +177,8 @@ ginvalidate(Oid opclassoid)
177177
{
178178
ereport(INFO,
179179
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
180-
errmsg("gin operator family \"%s\" contains operator %s with invalid strategy number %d",
181-
opfamilyname,
180+
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
181+
opfamilyname, "gin",
182182
format_operator(oprform->amopopr),
183183
oprform->amopstrategy)));
184184
result = false;
@@ -190,8 +190,8 @@ ginvalidate(Oid opclassoid)
190190
{
191191
ereport(INFO,
192192
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
193-
errmsg("gin operator family \"%s\" contains invalid ORDER BY specification for operator %s",
194-
opfamilyname,
193+
errmsg("operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
194+
opfamilyname, "gin",
195195
format_operator(oprform->amopopr))));
196196
result = false;
197197
}
@@ -203,8 +203,8 @@ ginvalidate(Oid opclassoid)
203203
{
204204
ereport(INFO,
205205
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
206-
errmsg("gin operator family \"%s\" contains operator %s with wrong signature",
207-
opfamilyname,
206+
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
207+
opfamilyname, "gin",
208208
format_operator(oprform->amopopr))));
209209
result = false;
210210
}
@@ -244,8 +244,8 @@ ginvalidate(Oid opclassoid)
244244
continue; /* don't need both, see check below loop */
245245
ereport(INFO,
246246
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
247-
errmsg("gin operator class \"%s\" is missing support function %d",
248-
opclassname, i)));
247+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
248+
opclassname, "gin", i)));
249249
result = false;
250250
}
251251
if (!opclassgroup ||
@@ -254,8 +254,8 @@ ginvalidate(Oid opclassoid)
254254
{
255255
ereport(INFO,
256256
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
257-
errmsg("gin operator class \"%s\" is missing support function %d or %d",
258-
opclassname,
257+
errmsg("operator class \"%s\" of access method %s is missing support function %d or %d",
258+
opclassname, "gin",
259259
GIN_CONSISTENT_PROC, GIN_TRICONSISTENT_PROC)));
260260
result = false;
261261
}

src/backend/access/gist/gistvalidate.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ gistvalidate(Oid opclassoid)
9090
{
9191
ereport(INFO,
9292
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
93-
errmsg("gist operator family \"%s\" contains support procedure %s with cross-type registration",
94-
opfamilyname,
93+
errmsg("operator family \"%s\" of access method %s contains support procedure %s with different left and right input types",
94+
opfamilyname, "gist",
9595
format_procedure(procform->amproc))));
9696
result = false;
9797
}
@@ -143,8 +143,8 @@ gistvalidate(Oid opclassoid)
143143
default:
144144
ereport(INFO,
145145
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
146-
errmsg("gist operator family \"%s\" contains function %s with invalid support number %d",
147-
opfamilyname,
146+
errmsg("operator family \"%s\" of access method %s contains function %s with invalid support number %d",
147+
opfamilyname, "gist",
148148
format_procedure(procform->amproc),
149149
procform->amprocnum)));
150150
result = false;
@@ -155,8 +155,8 @@ gistvalidate(Oid opclassoid)
155155
{
156156
ereport(INFO,
157157
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
158-
errmsg("gist operator family \"%s\" contains function %s with wrong signature for support number %d",
159-
opfamilyname,
158+
errmsg("operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
159+
opfamilyname, "gist",
160160
format_procedure(procform->amproc),
161161
procform->amprocnum)));
162162
result = false;
@@ -175,8 +175,8 @@ gistvalidate(Oid opclassoid)
175175
{
176176
ereport(INFO,
177177
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
178-
errmsg("gist operator family \"%s\" contains operator %s with invalid strategy number %d",
179-
opfamilyname,
178+
errmsg("operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
179+
opfamilyname, "gist",
180180
format_operator(oprform->amopopr),
181181
oprform->amopstrategy)));
182182
result = false;
@@ -193,8 +193,8 @@ gistvalidate(Oid opclassoid)
193193
{
194194
ereport(INFO,
195195
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
196-
errmsg("gist operator family \"%s\" contains unsupported ORDER BY specification for operator %s",
197-
opfamilyname,
196+
errmsg("operator family \"%s\" of access method %s contains unsupported ORDER BY specification for operator %s",
197+
opfamilyname, "gist",
198198
format_operator(oprform->amopopr))));
199199
result = false;
200200
}
@@ -204,8 +204,8 @@ gistvalidate(Oid opclassoid)
204204
{
205205
ereport(INFO,
206206
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
207-
errmsg("gist operator family \"%s\" contains incorrect ORDER BY opfamily specification for operator %s",
208-
opfamilyname,
207+
errmsg("operator family \"%s\" of access method %s contains incorrect ORDER BY opfamily specification for operator %s",
208+
opfamilyname, "gist",
209209
format_operator(oprform->amopopr))));
210210
result = false;
211211
}
@@ -223,8 +223,8 @@ gistvalidate(Oid opclassoid)
223223
{
224224
ereport(INFO,
225225
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
226-
errmsg("gist operator family \"%s\" contains operator %s with wrong signature",
227-
opfamilyname,
226+
errmsg("operator family \"%s\" of access method %s contains operator %s with wrong signature",
227+
opfamilyname, "gist",
228228
format_operator(oprform->amopopr))));
229229
result = false;
230230
}
@@ -262,8 +262,8 @@ gistvalidate(Oid opclassoid)
262262
continue; /* optional methods */
263263
ereport(INFO,
264264
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
265-
errmsg("gist operator class \"%s\" is missing support function %d",
266-
opclassname, i)));
265+
errmsg("operator class \"%s\" of access method %s is missing support function %d",
266+
opclassname, "gist", i)));
267267
result = false;
268268
}
269269

0 commit comments

Comments
 (0)