Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
740ee42d
Commit
740ee42d
authored
Dec 20, 2012
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some messages more consistent in style
parent
a0bfb7b3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_proc.c
+1
-1
src/backend/commands/vacuumlazy.c
src/backend/commands/vacuumlazy.c
+1
-1
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+2
-2
src/test/regress/expected/rangetypes.out
src/test/regress/expected/rangetypes.out
+4
-4
No files found.
src/backend/catalog/pg_proc.c
View file @
740ee42d
...
@@ -246,7 +246,7 @@ ProcedureCreate(const char *procedureName,
...
@@ -246,7 +246,7 @@ ProcedureCreate(const char *procedureName,
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INVALID_FUNCTION_DEFINITION
),
(
errcode
(
ERRCODE_INVALID_FUNCTION_DEFINITION
),
errmsg
(
"cannot determine result data type"
),
errmsg
(
"cannot determine result data type"
),
errdetail
(
"A function returning
ANYRANGE must have at least one ANYRANGE
argument."
)));
errdetail
(
"A function returning
\"
anyrange
\"
must have at least one
\"
anyrange
\"
argument."
)));
if
((
returnType
==
INTERNALOID
||
internalOutParam
)
&&
!
internalInParam
)
if
((
returnType
==
INTERNALOID
||
internalOutParam
)
&&
!
internalInParam
)
ereport
(
ERROR
,
ereport
(
ERROR
,
...
...
src/backend/commands/vacuumlazy.c
View file @
740ee42d
...
@@ -311,7 +311,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
...
@@ -311,7 +311,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
"pages: %d removed, %d remain
\n
"
"pages: %d removed, %d remain
\n
"
"tuples: %.0f removed, %.0f remain
\n
"
"tuples: %.0f removed, %.0f remain
\n
"
"buffer usage: %d hits, %d misses, %d dirtied
\n
"
"buffer usage: %d hits, %d misses, %d dirtied
\n
"
"avg read rate: %.3f M
iB/s, avg write rate: %.3f Mi
B/s
\n
"
"avg read rate: %.3f M
B/s, avg write rate: %.3f M
B/s
\n
"
"system usage: %s"
,
"system usage: %s"
,
get_database_name
(
MyDatabaseId
),
get_database_name
(
MyDatabaseId
),
get_namespace_name
(
RelationGetNamespace
(
onerel
)),
get_namespace_name
(
RelationGetNamespace
(
onerel
)),
...
...
src/backend/parser/parse_coerce.c
View file @
740ee42d
...
@@ -1694,7 +1694,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
...
@@ -1694,7 +1694,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
if
(
!
OidIsValid
(
range_typelem
))
if
(
!
OidIsValid
(
range_typelem
))
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_DATATYPE_MISMATCH
),
(
errcode
(
ERRCODE_DATATYPE_MISMATCH
),
errmsg
(
"argument declared
\"
anyrange
\"
is not a range but type %s"
,
errmsg
(
"argument declared
\"
anyrange
\"
is not a range
type
but type %s"
,
format_type_be
(
range_typeid
))));
format_type_be
(
range_typeid
))));
}
}
...
@@ -1915,7 +1915,7 @@ resolve_generic_type(Oid declared_type,
...
@@ -1915,7 +1915,7 @@ resolve_generic_type(Oid declared_type,
if
(
!
OidIsValid
(
range_typelem
))
if
(
!
OidIsValid
(
range_typelem
))
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_DATATYPE_MISMATCH
),
(
errcode
(
ERRCODE_DATATYPE_MISMATCH
),
errmsg
(
"argument declared
\"
anyrange
\"
is not a range but type %s"
,
errmsg
(
"argument declared
\"
anyrange
\"
is not a range
type
but type %s"
,
format_type_be
(
context_base_type
))));
format_type_be
(
context_base_type
))));
return
range_typelem
;
return
range_typelem
;
}
}
...
...
src/test/regress/expected/rangetypes.out
View file @
740ee42d
...
@@ -1180,7 +1180,7 @@ drop function anyarray_anyrange_func(anyarray, anyrange);
...
@@ -1180,7 +1180,7 @@ drop function anyarray_anyrange_func(anyarray, anyrange);
create function bogus_func(anyelement)
create function bogus_func(anyelement)
returns anyrange as 'select int4range(1,10)' language sql;
returns anyrange as 'select int4range(1,10)' language sql;
ERROR: cannot determine result data type
ERROR: cannot determine result data type
DETAIL: A function returning
ANYRANGE must have at least one ANYRANGE
argument.
DETAIL: A function returning
"anyrange" must have at least one "anyrange"
argument.
-- should fail
-- should fail
create function bogus_func(int)
create function bogus_func(int)
returns anyrange as 'select int4range(1,10)' language sql;
returns anyrange as 'select int4range(1,10)' language sql;
...
@@ -1287,14 +1287,14 @@ select * from table_succeed(123, int4range(1,11));
...
@@ -1287,14 +1287,14 @@ select * from table_succeed(123, int4range(1,11));
create function outparam_fail(i anyelement, out r anyrange, out t text)
create function outparam_fail(i anyelement, out r anyrange, out t text)
as $$ select '[1,10]', 'foo' $$ language sql;
as $$ select '[1,10]', 'foo' $$ language sql;
ERROR: cannot determine result data type
ERROR: cannot determine result data type
DETAIL: A function returning
ANYRANGE must have at least one ANYRANGE
argument.
DETAIL: A function returning
"anyrange" must have at least one "anyrange"
argument.
--should fail
--should fail
create function inoutparam_fail(inout i anyelement, out r anyrange)
create function inoutparam_fail(inout i anyelement, out r anyrange)
as $$ select $1, '[1,10]' $$ language sql;
as $$ select $1, '[1,10]' $$ language sql;
ERROR: cannot determine result data type
ERROR: cannot determine result data type
DETAIL: A function returning
ANYRANGE must have at least one ANYRANGE
argument.
DETAIL: A function returning
"anyrange" must have at least one "anyrange"
argument.
--should fail
--should fail
create function table_fail(i anyelement) returns table(i anyelement, r anyrange)
create function table_fail(i anyelement) returns table(i anyelement, r anyrange)
as $$ select $1, '[1,10]' $$ language sql;
as $$ select $1, '[1,10]' $$ language sql;
ERROR: cannot determine result data type
ERROR: cannot determine result data type
DETAIL: A function returning
ANYRANGE must have at least one ANYRANGE
argument.
DETAIL: A function returning
"anyrange" must have at least one "anyrange"
argument.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment