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
e2ac58c7
Commit
e2ac58c7
authored
Dec 01, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mention of factorial as casting example. New example needed.
parent
04a4821a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
25 deletions
+1
-25
doc/src/sgml/typeconv.sgml
doc/src/sgml/typeconv.sgml
+1
-25
No files found.
doc/src/sgml/typeconv.sgml
View file @
e2ac58c7
<!--
$PostgreSQL: pgsql/doc/src/sgml/typeconv.sgml,v 1.
39 2003/11/29 19:51:38 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/typeconv.sgml,v 1.
40 2003/12/01 21:53:15 momjian
Exp $
-->
<chapter Id="typeconv">
...
...
@@ -437,30 +437,6 @@ SELECT @ '-4.5e500' AS "abs";
ERROR: "-4.5e500" is out of range for type double precision
</screen>
</para>
<para>
On the other hand, the postfix operator <literal>!</> (factorial)
is defined only for integer data types, not for <type>float8</type>. So, if we
try a similar case with <literal>!</>, we get:
<screen>
SELECT '20' ! AS "factorial";
ERROR: operator is not unique: "unknown" !
HINT: Could not choose a best candidate operator. You may need to add explicit
type casts.
</screen>
This happens because the system can't decide which of the several
possible <literal>!</> operators should be preferred. We can help
it out with an explicit cast:
<screen>
SELECT CAST('20' AS int8) ! AS "factorial";
factorial
---------------------
2432902008176640000
(1 row)
</screen>
</para>
</example>
</sect1>
...
...
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