Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e3f14f

Browse files
author
Maxim Orlov
committed
Use hint instead of long message#32
1 parent1b37d66 commit2e3f14f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎expected/pg_variables.out‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,11 @@ ERROR: there is a record in the variable "r1" with same key
565565
SELECT pgv_insert('vars3', 'r1', row(1, 'str1', 'str2'));
566566
ERROR: new record structure have 3 attributes, but variable "r1" structure have 2.
567567
SELECT pgv_insert('vars3', 'r1', row(1, 1));
568-
ERROR: new record attribute type for attribute number 2 differs from variable "r1" structure. You may need explicit type casts.
568+
ERROR: new record attribute type for attribute number 2 differs from variable "r1" structure.
569+
HINT: You may need explicit type casts.
569570
SELECT pgv_insert('vars3', 'r1', row('str1', 'str1'));
570-
ERROR: new record attribute type for attribute number 1 differs from variable "r1" structure. You may need explicit type casts.
571+
ERROR: new record attribute type for attribute number 1 differs from variable "r1" structure.
572+
HINT: You may need explicit type casts.
571573
SELECT pgv_select('vars3', 'r1', ARRAY[[1,2]]); -- fail
572574
ERROR: searching for elements in multidimensional arrays is not supported
573575
-- Test variables caching
@@ -959,7 +961,8 @@ SELECT pgv_insert('vars', 'r2', row(1, 'str1'));
959961
(1 row)
960962

961963
SELECT pgv_insert('vars', 'r2', foo) FROM foo;
962-
ERROR: new record attribute type for attribute number 2 differs from variable "r2" structure. You may need explicit type casts.
964+
ERROR: new record attribute type for attribute number 2 differs from variable "r2" structure.
965+
HINT: You may need explicit type casts.
963966
SELECT pgv_select('vars', 'r2');
964967
pgv_select
965968
------------

‎pg_variables_record.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ check_attributes(Variable *variable, TupleDesc tupdesc)
204204
ereport(ERROR,
205205
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
206206
errmsg("new record attribute type for attribute number %d "
207-
"differs from variable \"%s\" structure. You may "
208-
"need explicit type casts.",
209-
i+1,GetName(variable))));
207+
"differs from variable \"%s\" structure.",
208+
i+1,GetName(variable)),
209+
errhint("You may need explicit type casts.")));
210210
}
211211
}
212212

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp