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
5ea93228
Commit
5ea93228
authored
Sep 15, 2002
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast functions can be immutable or stable.
parent
db4f3c03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
doc/src/sgml/ref/create_cast.sgml
doc/src/sgml/ref/create_cast.sgml
+2
-2
src/backend/commands/functioncmds.c
src/backend/commands/functioncmds.c
+3
-3
No files found.
doc/src/sgml/ref/create_cast.sgml
View file @
5ea93228
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.
3 2002/09/01 02:37:02 tgl
Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.
4 2002/09/15 13:04:16 petere
Exp $ -->
<refentry id="SQL-CREATECAST">
<refentry id="SQL-CREATECAST">
<refmeta>
<refmeta>
...
@@ -117,7 +117,7 @@ INSERT INTO foo(f1) VALUES(42);
...
@@ -117,7 +117,7 @@ INSERT INTO foo(f1) VALUES(42);
be schema-qualified. If it is not, the function will be looked
be schema-qualified. If it is not, the function will be looked
up in the path. The argument type must be identical to the
up in the path. The argument type must be identical to the
source type, the result data type must match the target type of
source type, the result data type must match the target type of
the cast. Cast functions must be marked immutable.
the cast. Cast functions must be marked immutable
or stable
.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
src/backend/commands/functioncmds.c
View file @
5ea93228
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.
19 2002/09/04 20:31:15 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.
20 2002/09/15 13:04:16 petere
Exp $
*
*
* DESCRIPTION
* DESCRIPTION
* These routines take the parse tree and pick out the
* These routines take the parse tree and pick out the
...
@@ -676,8 +676,8 @@ CreateCast(CreateCastStmt *stmt)
...
@@ -676,8 +676,8 @@ CreateCast(CreateCastStmt *stmt)
elog
(
ERROR
,
"argument of cast function must match source data type"
);
elog
(
ERROR
,
"argument of cast function must match source data type"
);
if
(
procstruct
->
prorettype
!=
targettypeid
)
if
(
procstruct
->
prorettype
!=
targettypeid
)
elog
(
ERROR
,
"return data type of cast function must match target data type"
);
elog
(
ERROR
,
"return data type of cast function must match target data type"
);
if
(
procstruct
->
provolatile
!=
PROVOLATILE_IMMUTAB
LE
)
if
(
procstruct
->
provolatile
==
PROVOLATILE_VOLATI
LE
)
elog
(
ERROR
,
"cast function must
be immutab
le"
);
elog
(
ERROR
,
"cast function must
not be volati
le"
);
if
(
procstruct
->
proisagg
)
if
(
procstruct
->
proisagg
)
elog
(
ERROR
,
"cast function must not be an aggregate function"
);
elog
(
ERROR
,
"cast function must not be an aggregate function"
);
if
(
procstruct
->
proretset
)
if
(
procstruct
->
proretset
)
...
...
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